-
Notifications
You must be signed in to change notification settings - Fork 463
perf: optimize desktop app startup time #2644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: optimize desktop app startup time #2644
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote canceled.
|
✅ Deploy Preview for howto-fix-macos-audio-selection canceled.
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
|
/staging |
|
|
@ComputelessComputer please review if it work(no regression + faster startup) |
- Gate extension globals loading for iframe contexts only, deferring heavy UI component loading until actually needed by extensions - Change import.meta.glob from eager to lazy loading for UI components - Add loading spinner UI while store initializes instead of blank screen - Reduce window show sleep from 100ms to 10ms These changes should significantly reduce the ~2 second UI unresponsiveness on startup by: 1. Avoiding synchronous loading of all UI components at startup 2. Showing responsive UI immediately while store loads in background 3. Reducing artificial delay in window show Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
i think this does reduce the overhead by 1~2 seconds but it is most definitely awful having a blank white screen on startup. opti.mp4 |
c1e4f37 to
1010474
Compare
1010474 to
68633a9
Compare
|
updated splash from spinner to skeleton |
Summary
Addresses UI lag (~2 seconds of unresponsiveness) on desktop app startup by:
Lazy loading extension globals - Changed
import.meta.globfrom eager to lazy loading and only initialize extension globals for iframe/extension contexts. This defers heavy UI component loading until actually needed.Show loading UI immediately - Display a loading spinner while the TinyBase store initializes instead of rendering nothing (
null), making the app feel responsive immediately.Reduce window show delay - Decreased the hardcoded sleep in window show from 100ms to 10ms.
Review & Testing Checklist for Human
initExtensionGlobals()is now only called there and loads modules asynchronouslywindow.__hyprnoteor related globalsRecommended test plan:
Notes
show_asyncwith proper readiness signalingLink to Devin run: https://app.devin.ai/sessions/7c7cd7abf4134af2b9f6d813d18c9acd
Requested by: john@hyprnote.com (@ComputelessComputer)