Speed up app launch via background emoji loading, progressive UI rendering, and loading state 🚀#121
Speed up app launch via background emoji loading, progressive UI rendering, and loading state 🚀#121larouxn wants to merge 2 commits intomijorus:masterfrom
Conversation
Speed up launch and prevent blocking app UI by: 1. Moving emoji loading into background process. 2. Rendering emojis progressively in batches with loading UI fallback. 3. Rendering a loading state to conceal background loading on slower systems.
4bdd993 to
ac211a9
Compare
|
Even though I know that loading the emoji data in the background is valid approach for making the app startup faster. I am not entirely convinced by the implementation. I think it generally makes sense but it probably could be far simpler, smaller, cleaner. Heck, maybe we don't need background loading at all and some kind of cache could better speed up the app startup in a simpler way. 🤔 While I'm still thinking about this PR, whether it's the right way, I am sure I'd like to get the following much simpler improvements merged whenever possible, pending review of course.
|
|
Update re: above, I tried a simpler caching based approach but the checking of cache validity actually made it slower than
But I don't think 0.5 seconds speedup is worth the added complexity introduced by this PR. If it got launch to under 1 second, perhaps, but not 2.5 down from 3. Thus, closing this PR. |
|
@larouxn I have already tried many tricks to speed up the app launch, including using a sqlite database instead of a python List. Unfortunately, most of this stuff just adds complexity, the biggest slowdown is the startup of the Flatpak environment |
|
Flatpaks are bloaty, this is the reason that this is like 🐌🐌🐌. |
I'm using the AUR package and it's taking 1~2s to open. |
Important
Should merge #120 first as this is built on top of such. This PR's proposed changes are just those in 4bdd993.
What does this PR do?
This PR aims to speed up the launch of Smile from around 2-3 seconds to under a second via offloading emoji loading to a new background process based loader and progressively rendering the massive emoji list via a new batch-based progressive renderer while also adding a loading state to conceal the background loading on slower systems.
ℹ️ Full transparency, I did use LLMs (mainly Claude and a bit of Gemini) to implement the first version of most these changes as I'm both unfamiliar with GTK/Flatpak/etc. and Python¹. That said, I have manually gone through everything several times and iterated as I felt necessary.
¹ More of a Ruby/Rails/web dev myself but I really enjoy this app and GNOME so I'd like to improve it! 🚀
Resolves #114
🎩 Tophatting/checking app 🎩
Before (current app)
Screencast.From.2025-08-10.15-50-57.mp4
After (this PR local build)
Screencast.From.2025-08-10.15-49-58.mp4
🎩 Tophatting/checking loading 🎩
Screencast.From.2025-08-10.17-31-00.mp4