Improving UI response

Since there are some people suffering from UI performance reported in the previous topic, I propose an activity to improve UI performance of Joplin.

Goals

  • To make more people feel comfortable with the UX.
  • To make more people affordable to use plugins.
  • Judging from the collected information in the previous topic, I estimate the time of note-switching will be halved without any practical loss of maintainability.

Notes

  • This activity focuses on the UI response, especially on note-switching. Other performances such as sync are out of the scope.
  • The degree of improvement would be limited to what can be achieved by fixing performance bugs and making small tweaks. Drastic performance improvement would need fundamental changes, but, it would take long time and won't benefit users right away.

Relevant issues and technical analysis will be reported in this issue or bug-specific issues.

Current Status

  • Ready to be merged (2022-05-01)
    • 6 of 11 PRs were merged and available in v2.9.17. (2022-11-15)
    • The remaining 5 PRs are awaiting reviews.
  • Demo branch is available. (detail).

Result

  • 2x to 4x faster (= comfortable for most PCs) (detail)

11 Likes

This chart is the visual summary of the previous topic. The blue and red lines show the elapsed time to switch notes. Since there are various performance PCs, the measured values lie in a wide range.

For example, when no plugins are used, switching within a notebook ranges from about 90 msec (fast PC) to 460 msec (slow PC). It would be acceptable. However, when some plugins are used, switching between notebooks is over 1500 msec. It would be unacceptable for many users.

image

It is desirable for as many PCs as possible that the time is reduced into an acceptable range.

3 Likes

To achieve the response improvement goal, I set three milestones.

4 Likes

Progress Report #1

Now, milestone 1 is nearing completion, and PR has been made. It's discussed here.

To illustrate the current achievement, the next chart shows the improvement of note switching time from the performance before this activity to the current milestone performance. These measurements are consistently performed in my PC (Core i5-4670, Win10) as a reference.

ui-improvement-progress1

The purpose of Milestone 1 is to reduce plugin overheads. Within a notebook with 2 plugins (Note Tabs and Outline), note switching time is reduced from 706 msec to 259 msec (63% reduced). So, I would say it has served the purpose. But for switching between notebooks, there are still large overheads. They will be reduced in Milestone 2 and 3.

11 Likes

Progress Report #2

Now, milestone 2 is nearing completion, and PR has been made. It's discussed here.

ui-improvement-progress2

The purpose of Milestone 2 is to reduce overheads using SideBar. The times of both note switchings using SideBar (wihin-a-notebook and between-notebooks) are reduced by 370-490 msec (35-37%). So, it seems to have served its purpose.

11 Likes

Milestone 1 is merged in v2.8.3.

4 Likes

Progress Report #3

Now, milestone 3 is half done, and 4 PRs have been made. It's discussed here.

ui-improvement-progress3

The purpose of the first half of Milestone 3 is to reduce frequent but fine overheads and re-rendering. In general, about 20% of time is reduced.

12 Likes

Progress Report #4

Now, milestone 3 is nearing completion, and finally, 9 PRs have been made. It's discussed here.

ui-improvement-progress4

The chart shows:

  • From milestone 2 to 3, in general, about 40% of time is reduced.
  • The final performance is about 2-4 times faster than the performance before this activity.
13 Likes

I've prepared a demo branch for those who would like to try the improved UI response.
(Note: For those who can build a binary from source codes)

It is based on the latest stable Joplin version 2.7.15 and contains 11 PRs in the above three milestones.

Enjoy!

3 Likes

Result

The result of this improvement activity is illustrated here.

The chart is based on the above survey summary chart. It shows where the performance of the reference PC (Core i5-4670, CPU Mark=5403, Win10) (white circles) is in the range of user PCs. Simultaneously, it shows where the improved performance of the reference PC (black stars) is.

According to the chart, it can be estimated that most PCs will have acceptable performance (less than 1 sec response) by applying PRs proposed in this activity.

17 Likes

Tested it with the patched repo, and the response speed improvement is obvious with 9+ plugins. Amazing work! I just wondered why obsidian is much smoother than Joplin when switching notes and found this post.

Hope all the PRs can be merged as soon as possible since I cannot build the *.dmg package successfully.

3 Likes

Just some tips for others who want to build the *.dmg package on macOS:

If you face the following error message during yarn run dist: gyp: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp, then you can try to build with node@16 instead.

I also tried to merge all the commits in 2.8.0+ version to the patched repo. Most of the conflict files are easy to solve except for app-desktop/gui/NoteList/NoteList.tsx. It seems this file is almost completely rewritten.

Tested it with the patched repo, and the response speed improvement is obvious with 9+ plugins. Amazing work!

Thanks for your impression report!

I just wondered why obsidian is much smoother than Joplin when switching notes and found this post.

As you said, current Joplin seems to be slower than other note-taking apps. I've also heard opinions like "Why is Joplin so much slower than other Electron apps?"
However, it can be at least as fast as other apps.

Quick UI response is a very important factor for note-taking apps. When compared to other apps, I'm concerned that the current slowness of Joplin's UI is detracting from its appeal.

4 Likes

A new demo branch is prepared for those who would like to try the improved UI response.

It is based on the latest pre-release Joplin version 2.8.8 and contains 11 PRs in the above three milestones.

The demo based on 2.7.15 is still available here.

Enjoy!

5 Likes

Now, 2.8.8 becomes the latest stable version, and this (2.8.8) improvement demo can be used as is.

7 Likes

It's been amazing 2 months since I tried quick-slim branch and I've decided to share my feedback with y'all :relieved:

For many, performance boost in this branch might seem minor thing, but for me personally, it made me truly appreciate so much more of Joplin.

Particularly, I was able to install and use a lot more of our great plugins. With little incremental impact on performance that felt quite liberating!

Since it got snappier, I noticed that I naturally spend more engaged time with Joplin: writing more detailed notes, organising notebook tree, saving and extending documentation. It very nearly became my go-to application for anything of substance. In this mindset, like many other members of our community, I even started to write little scripts and snippets helping me achieving my goals.

In social aspect, this improvement made me sure that I can recommend Joplin to older folks who often have quite outdated hardware and at the same time, are easily put off by minor inconvenience.

In conclusion, I want express my gratitude to all contributors: you're truly making my life and lives of my loved ones, easier and better. Thank you :clap:

Testing notes

Since changes in quick-slim branch involved switching between notes, notebooks and reducing rendered updates, I've been attempting to force it to get stuck on previously rendered note.

How: deleting notebook with currently focused note, transition from empty notebook, deleting tags, deleting last note in a tag list, using go-to, using favourites plugin, resolving conflicts, using internal links with # ancors and external links

Result: all passed

I've stumbled upon some flaky weirdness with notelist focus shortcut, but couldn't either localise or attribute it to the specific Joplin version.

7 Likes

when merge? :wink:

Thank y'all so much for all your contributions! :pray:

@graphit0, thank you for your great user impression review and test report!

Your points are very spot-on. As you wrote, this activity drastically changes Joplin's UX. That is, it delivers higher levels of comfort, usability and extensibility.

It has been six months since I first started this activity. I've been using this quick-slim-note branch since that time, and I can no longer imagine using Joplin without it.

I'm looking forward to sharing this wonderful experience with all users.

7 Likes

I am not a Joplin committer, so I can't answer the question directly.
Generally speaking, since Joplin is a volunteer-based OSS, users' activities play great roles. User voices will raise the priority, and user supports will speed up the merging process.

Code reviewing, user testing, bug reports, and user impression reports will all be helpful. Especially, code reviewing is essential.
I think @graphit0's recent post is a great example of such contributions.

12 Likes

Stable v2.8.8-based demo now includes PR#6640 fixing issue#6639.

5 Likes