Build 154: Performance Boost! โก๐
Added 2019-12-08 18:53:15 +0000 UTC- Increase wiki tree performance and eliminate slowdown caused by number of articles in project.
- Fix memory leak causing severe performance drop after using the app for a while.
- Increase shortcut limit to 5.
- Enhance main sidebar to remember its collapse state and width between refreshes and page navigations.
The tree performance boost took a lot of code changes; let me know if you see any UI jank or weird behavior.
Tech Details for Nerds:
The wiki tree in Dragon, while more elegant on the surface, had some serious performance issues. The previous tree, React Sortable Tree, did something called virtualization, or windowing. (More info here ). Long story short, this made sure that UI elements not visible would not be rendered. The new tree, Atlaskit Tree, does not have windowing, but has better cutomization and underlying drag and drop engine. Due to the code being a lot cleaner, I figured I could migrate to this new tree, reap the benefits of the new drag and drop, and optimize the performance later, as how bad could it be?

Dragon sidebar on the left, Dragon + Performance update on the right. Notice 400+ms delay after clicks on the left.
Turns out, the performance was awful on large projects that re-render a lot (something else I need to fix...). If you've logged into Sharedlandia in the past week, you saw the jankiness firsthand. I considered rolling back to RST, but I did like Atlaskit Tree. What's a dev to do?
I forked that thang and added windowing to Atlaskit Tree. It took rewriting some of the internals, but the performance boost was huge. The vanilla version of atlaskit tree struggled with displaying 400+ items in a render-heavy environment; the windowing version screams through 10k+ items. I'd like to eventually open source my changes under the license Atlaskit uses, Apache 2.0, but it'll take some work to clean up and make it suitable for generic use. (Atlassian is in no way affiliated with LK, and makes no guarantees regarding the code used in this project.)