Desktop UI is too slow to work efficiently

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