perf(desktop): unblock packaged frontend startup - #2762
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.copy-<uuid>directories without touching valid revisions, similarly named directories, regular files, or symlinks.Fixes: N/A (no linked issue).
Type and Areas
Type:
Areas:
Motivation / Impact
Release builds previously walked, hashed, and copied the complete packaged frontend before creating the main window. The current frontend contains 982 files and approximately 75.95 MB of assets, making cold startup noticeably slow.
The packaged frontend now has a build-time content identity, allowing the desktop runtime to initialize from a small manifest and immediately serve packaged assets. The full rollback copy happens after the window loads.
Measured in an isolated release-fast launch:
The change also ensures that backup-based state recovery repairs the primary state file and that interrupted background copies do not accumulate indefinitely.
Verification
pnpm run fmt:rscargo check -p bitfun-desktopcargo build -p bitfun-desktopcargo test -p bitfun-desktop --lib --no-runpnpm run test:release-packagingpnpm run desktop:build:release-faststate.invalid.*preservation file was created..copy-<uuid>directory was removed after page load.The desktop Rust test executable compiled successfully, but executing it on this Windows host failed before test entry with
STATUS_ENTRYPOINT_NOT_FOUND (0xc0000139). The affected behaviors were therefore additionally verified through the real release-fast desktop process.Reviewer Notes
frontend-revision.jsonand basicindex.htmlmetadata; it does not traverse or hash the full frontend tree.Checklist