You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over time more JavaScript has been added to Joplin's critical path to an initial render. One of those scripts which are quite heavy is SyncTargetAmazonS3.js. This is a development build below but it seems to take up a chunk of time just in the parsing of itself and it's dependencies, which seems proportional considering most people won't be using this utility at all.
@sanyamhbtu yes absolutely! I don’t know if Joplin has a centralised “everything has rendered” API where lower priority tasks can run, or you can just move this to the useEffect, but either way, dynamically importing these will help a lot.
Some electron apps (like VS Code for e.g) have a global event which fires once the core app is rendered.
@jasonwilliams Thanks for the confirmation! I agree, using a central event or a global hook for determining when the app is fully rendered would be ideal. If Joplin has a similar event or API, I’ll hook into that. If not, I can go ahead and use useEffect to dynamically import the script after the initial render. I’ll give this approach a try and keep you updated on the progress.
Operating system
Windows
Joplin version
Joplin 3.2.6
Desktop version info
Joplin 3.2.6 (dev, win32)
Client ID: 4592d91627554b8f9f896c8c23b60f91
Sync Version: 3
Profile Version: 47
Keychain Supported: Yes
Revision: 2b43a9a (dev)
Backup: 1.4.2
Freehand Drawing: 2.13.0
Current behaviour
Over time more JavaScript has been added to Joplin's critical path to an initial render. One of those scripts which are quite heavy is SyncTargetAmazonS3.js. This is a development build below but it seems to take up a chunk of time just in the parsing of itself and it's dependencies, which seems proportional considering most people won't be using this utility at all.
Trace
Trace-Joplin-Dev-20250102T175540.json
Expected behaviour
I wonder if the registry entries need to be loaded this early on and block rendering, or is there a delayed time we can add these in later on?
It may be an idea to have some hook which fires after initial render which can dynamically import these entries.
I don't know for sure how early these are needed though
Debugging setup
I used this so I could debug both the main process and the renderer process in VS Code, let me know if you want me to add it to the documentation somewhere
https://gist.github.com/jasonwilliams/6ebf25e97998e99ca32eb96ee4cceb6c
Logs
No response
The text was updated successfully, but these errors were encountered: