Refactor initialization to use background threads#1300
Refactor initialization to use background threads#1300Stefterv wants to merge 1 commit intoprocessing:mainfrom
Conversation
|
Cool! How much did performance improve? Also what is going on with the preferences not being initialized meaning adding a new settings thing. Do any of these threads need to be joined at some point? Or it's fine for all of them to just start and end whenever? |
|
Performance went from 1500ms to 350ms startup time, so now the welcome & splash screen itself is actually the biggest bottleneck in starting. The As for joining the threads, I wanted to look into this further, so far in my testing the PDE starts just fine and I haven't noticed any issues, but that's only tested on one devices on one os, so not particularly extensive (: |
Moved several initialization tasks to background threads for improved startup performance and responsiveness, including tool, font, UI, and suggestion generator setup. Deferred some tool initialization until first use, added caching for SVG rendering, and simplified string loading in PApplet. Also made minor changes to library list and variable inspector initialization. # Conflicts: # app/src/processing/app/Base.java # app/src/processing/app/platform/DefaultPlatform.java
3d39804 to
cd3aa32
Compare
|
Have you considered using an |
|
No I didn't know of that! I think in general the startup sequence needs a revisit, so this PR is a stopgap to at least get some speedup without doing a larger refactor as I don't see that happening anytime soon |
|
If there is a thread pool manager we can use to manage threads we should use that. I'd prefer we not introduce the use of low-level concurrency primitives on the app startup code paths to improve startup performance when it sounds like it all needs to be changed anyways. |
Moved several initialization tasks to background threads for improved startup performance and responsiveness, including tool, font, UI, and suggestion generator setup. Deferred some tool initialization until first use, added caching for SVG rendering, and simplified string loading in PApplet. Also made minor changes to library list and variable inspector initialization.
Preferenceswill not yet be initialised.Screen.Recording.2025-10-22.at.17.12.21.mov