Desktop UI is too slow to work efficiently

Swapping to "1. Welcome to Joplin" in "Welcome! (Desktop)" from within notebook took 87ms.
Swapping to "1. Welcome to Joplin" in "Welcome! (Desktop)" from a different notebook (not within the same parent folder either) took 420ms ( :upside_down_face:)

Joplin 2.6.10 (prod, linux)
Revision: 98fba37

OS: Linux Mint 20.3 x86_64
Host: MS-7B85 1.0
Kernel: 5.4.0-96-generic
DE: Cinnamon
WM: Mutter (Muffin)
CPU: AMD Ryzen 5 3600X (12) @ 3.800G
GPU: AMD ATI Radeon RX 5600 OEM/5600
Memory: 3990MiB / 16019MiB

Note: 768/768
Folder: 137/137
Resource: 2945/2945
Tag: 24/24
NoteTag: 312/312
MasterKey: 0/0
Revision: 1206/1206
Total: 5392/5392

The only plugin I have installed is Simple Backup

3 Likes

orz...

To make the differences clear, I measured the performance without plugins in my PC.

Switching to "1. Welcome to Joplin" :

Condition From the same notebook From a different notebook Remarks
no plugin 237 msec 998 msec New results
many plugins 916 msec 2782 msec Measured before

The CPU performances of mine and Daeraxa's PC are as follows. Since most of the elapsed time is script execution, the performance depends on a CPU. Therefore, the differences (237ms & 998 ms vs 87ms & 420ms) seem to be reasonable.

CPU CPU Mark Remarks
Core i5-4670 5403 ken1kob's
AMD Ryzen 5 3600X 18295 Daeraxa's

From the results, here's what I can say.

  • PC performance often varies several times, so just because it's comfortable for someone doesn't mean it's the same for everyone.
4 Likes

I have access to a couple of other systems that Joplin is installed on:

  • Windows 10 on the same hardware (but different drives) as my linux system I tested with (i.e. same CPU/memory)
  • Windows 10 on an old and ill laptop that serves as little more than a very large and heavy Chromebook these days
  • macOS on 2014 mac mini which is possibly the slowest computer I've used in my life and took over 45 mins to build Joplin from source.

I'll have a go with the same test on those.

1 Like

@ken1kob, any chance you could also check the performance with only the Outline plugin, and only the Tab plugin? Those two plugins don't need to do any big processing in the background, so I'm wondering if they can be improved, or if it's a major performance issue with the app itself.

I know you have this PR about optimising the view parameter, which could indeed be part of the reason for the poor performance.

Here. (only within notebook)

Switching to "1. Welcome to Joplin" :

Condition From the same notebook From a different notebook Remarks
only Outline plugin 492ms - new result
only Note Tabs plugin 517ms - new result
no plugin 237 msec 998 msec
many plugins 916 msec 2782 msec

Those two plugins don't need to do any big processing in the background, so I'm wondering if they can be improved, or if it's a major performance issue with the app itself.

When I read their codes, there were little major performance problems. (There were some rooms for optimization, such as memoizing API calls. But, they were not significant.)

Maybe, the problem is in Joplin. While I measured the performance in these days, I noticed that the performance degradation depends not on specific plugins but on the type of plugins. Concretely, for each plugin with a panel using onNoteChange() / onNoteSelectionChange() is used, some overhead (ex. 300msec in my PC) will be added.
Note Tabs and Outline are in the type. Maybe, Note Link System plugin is also the same.

I know you have this PR about optimising the view parameter, which could indeed be part of the reason for the poor performance.

I have the same opinion. I make a hypothesis that the update of the html property of a plugin panel may happens to re-render the whole app, because all components depend on the property. Its overview is here.

image

To further investigate the hypothesis, I measured the performance in Joplin 2.7.10 which PR #5770 is applied to. The results are as below.

Switching to "1. Welcome to Joplin" :

Condition From the same notebook From a different notebook Remarks
only Outline plugin
+ PR #5770
184ms - new result
only Note Tabs plugin
+ PR #5770
190ms - new result
no plugin
+ PR #5770
154 msec 365 msec new result
many plugins*
+ PR #5770
258 msec 1517 msec new result
* see above

Since PR #5770 removes unnecessary dependencies between html property and many components, unnecessary re-rendering is reduced. It seems that overhead originated from plugin panels are drastically reduced.

6 Likes

Did some testing with this mac mini. Took me about 20 mins just to install the 2.6.10 dmg...

Test 1: 456ms
Test 2: 1620ms

No plugins
Sync'd so same note data as my linux test

Joplin 2.6.10 (prod, darwin)
Revision: 98fba37

OS: macOS 11.5.2 20G95 x86_64
Host: Macmini7,1
Kernel: 20.6.0
DE: Aqua
WM: Quartz Compositor
CPU: Intel i5-4278U (4) @ 2.60GHz
GPU: Intel Iris
Memory: 4303MiB / 8192MiB

Also retested with my windows 10 machine (with the same hardware as my linux machine)
Test 1: 126ms
Test 2: 662ms

1 Like

Not sure, whether it is still interesting, but here are my results:

(My enviroment: Desktop UI is too slow to work efficiently - #4 by Wimvan)

Condition Switching to "1. Welcome to Joplin" from same Notebook Switching to "1. Welcome to Joplin" from different Notebook
Outline, Note Tabs plugins & Spellcheck 1.675ms 3.411ms
Outline, Note Tabs plugins 1.370ms 2.806ms
Note Tab plugin 1.015 ms 2.163 ms
Outline plugin 879 ms 1.965 ms
No plugins 402 ms 1.282 ms

HTH

6 Likes

Thanks, @Daeraxa.

I would summarize as follows:

  • Between Linux (87 ms) and Win (126 ms), there might be some performance difference but no OS-specific performance issues.
  • There can be a fair difference between a modern PC (87 ms) and an old PC (456 ms). (5x!)
1 Like

Thanks, @Wimvan.

Your exhaustive results endorse our previous experiments and hypothesis.

Honestly speaking, I'm surprised that your PC is relatively slow, since you wrote "fluently". In such a case, I might feel sluggish rather than fluent. It is interesting that various impressions on UX co-exists.

1 Like

I'm baffled too.

I work remotely from HO for nearly two years now, so I might gotten used to slow changes of applications or windows. On the other hand, my typical use case for Joplin is working on one note - perhaps in a longer text - then switching to a different application and then perhaps return to Joplin for creating a new note or searching an existing one. I can imagine that switching from note to note is not such regular operation for me in contrast to others.

And I use Joplin portable on an bitlock-encrypted USB-stick as well. So I have a different perception of sluggishness definitly :relieved:

I noticed interesting a behavior.

When a note is switched, its elapsed time depends where to click to trigger switching. For example, if you switch a note by clicking Sidebar, it takes longer time. If you switch a note by clicking NoteList, it takes shorter time. The measurements are here:

Condition Where to click Switching to "1. Welcome to Joplin" from a different notebook
many plugins NoteList 1153 msec
many plugins Note Tabs plugin 1839 msec
many plugins Sidebar 2782 msec

I analyzed the causes of the differences.

The difference between NoteList and Note Tabs plugin is the overhead of a plugin decribed before and other unidentified overhead.

As you notice, the overhead of Sidebar is significant. The most of the overhead is unmounting and mounting NoteEditor. When a notebook in the Sidebar is clicked, for a only moment, no note is selected, and NoteEditor is unmounted. After that, a note in a new notebook is selected, and NoteEditor is mounted again. Since mounting NoteEditor involves heavy operations such as loading large javascript modules (ex. mermaid.min.js), it takes long time.

5 Likes

Not sure if it helps but interestingly enough it doesn't seem to be happening when selecting the notebook from a note in a search result. In other words, the time of opening the notebook in the searched note (the same note is focused as a result) is on par with "switching to a note from the same notebook".

UPD: I rechecked it, and it seems the time of opening the notebook in the searched note is 1,5x higher than "switching to a note from the same notebook". So, on par with note tab way of switching notes I guess :person_shrugging:

1 Like

@graphit0, thank you for showing the detour.
To be honest, I hope Sidebar is the most efficient, since it's Joplin's fundamental UI. :wink:

1 Like

@ken1kob, regarding the test case "switch to a note from different notebook", do you include or exclude from the timing the "Evaluate script" task at the end of note switch?


I'm currently testing a few pieces of hardware available to me. It's a WIP but if you would like to add some parameters to keep track, I can do that. So far, I'm tracking only the following:

  • os
  • cpu
  • gpu
  • plugins_enabled
  • spellchecker
  • safe_mode
  • sync_status
  • (pending) package

Once I'm done, I intent post the result but the current messy state of the table is available here
https://ethercalc.net/103bcn1xdtko

3 Likes

I included it. Because it always happens when Sidebar is clicked.

It's a WIP but if you would like to add some parameters to keep track, I can do that.

Thanks. It's enough!

1 Like

My app is also noticeably slow, even on an M1 mac. I use a lot of plugins though, so I just assumed it was that and ignore it as much as I can. I got a crash when trying to profile, so not able to add specific numbers, but one thing I noticed is that the app logs 60+ messages to console every time i change notes and 90+ when changing notebook. Is it possible that logging is slowing things down? Or is that trivial/normal? I will try to get some better profiling info.

It is slow on a Linux laptop with 2 cores (Intel GPU) + SSHD. Sync pretty much takes down the whole computer for minutes. This is my second laptop with similar specs, and I had the same speed issue with the previous one. I do not use a lot of plugins.

Its speed is fine on my 6 core desktop.

Switch note testing of low spec hardware

image

The word of warning: the chart mushes all test states together and doesn't account for multiple entries of the same state. So if you want to look at the good data, make your own chart out of the source.

The data source EtherCalc - Share the URL to your friends and edit together!

App states
  • No data, no plugins, no safe mode, no spellchecker
  • No plugins, no safe mode, no spellchecker (user data + settings)
  • Note tabs + outline only
  • Note tabs + outline only + Spellchecker
  • Note tabs only
  • Outline only
  • Safe mode
  • Safe mode + Spellchecker
  • Usual setup*
CPUs involved
cpu cpu_mark
Intel i5-3427U (4) @ 1.8-2.30 GHz 2311
Intel i3-4150 (4) @ 3.50GHz 3353
Intel i3 M 370 (4) @ 2.399GHz 1127
footnote

*"Usual setup" means user data + custom set of plugins: com.andrejilderda.macOSTheme.jpl

  • com.coderrsid.pasteSpecial.jpl
  • com.github.joplin.kanban.jpl
  • com.github.marc0l92.joplin-plugin-jira-issue.jpl
  • com.github.marc0l92.joplin-plugin-plantUML.jpl
  • com.whatever.quick-links.jpl
  • io.github.jackgruber.backup.jpl
  • io.github.jackgruber.combine-notes.jpl
  • io.github.manuerwin.attache.jpl
  • joplin.plugin.ambrt.convertToNewNote.jpl
  • joplin.plugin.ambrt.sendSnippet.jpl
  • joplin.plugin.benji.persistentLayout.jpl
  • joplin.plugin.templates.jpl
  • org.joplinapp.plugins.admonition.jpl
  • plugin.calebjohn.rich-markdown.jpl
2 Likes

Thank you all for many opinions and measurements.

Let me summarize here:

  • Some people are suffering from Joplin's UI performance.
    • Since the specs of PCs are in a very wide range (5x), just because it's comfortable for someone doesn't mean it's the same for everyone.
    • Some people forgo using plugins to mitigate UI performance problems.
  • People have different impressions of whether the UI is slow or fast.
    • A case that may seem slow to one person may be acceptable to another, and vice versa.
    • It's possible that some people don't realize that others are using Joplin with quick response.
  • Some performance bugs are pointed out.
    • For each additional plugin of some type, the UI response gets worse to a negligible degree.
    • Switching a note using Sidebar is extremely slow.
12 Likes

Let me state my concern. Joplin is a great app, but I'm afraid that the impression of the heavy UI will turn away not a few new users.

In this topic, we learned many new things. Based on this information, shouldn't we do something to improve the UX in Joplin?