Repository navigation
perf(core): unzip decks with native decompression - #151
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Unzipping was most of the time to the first slide: JSZip inflates and decodes every part in JavaScript, which took 273 ms of the 318 ms it took to show the first slide of the 300-slide bench deck.
ooxml/unzip.tsreads the zip's central directory and inflates entries with the platform'sDecompressionStream("deflate-raw"), decoding text withTextDecoder.readPptxuses it whenever the runtime supportsdeflate-raw.maxTotalUncompressedBytesormaxMediaBytes, or inflate far past them first. JSZip only checked once it had inflated the whole entry.deflate-raw, and non-zip input all go through JSZip as before. The editable source package (keepSourcePackage) still loads with JSZip, which only reads the directory up front.pnpm bench --runs 9 --against <main build>: the two builds alternate run by run, median of 9, Chromium headless shell 156 on Linux. Times in milliseconds:An A/A run moves these by up to ±10%.
pnpm bench --shotsbefore and after, compared withpnpm bench:diff: 448 of 448 slides identical pixel for pixel.Not shown:
deflate-raw(Firefox 113, Safari 16.4), and older versions use JSZip. The Chromium e2e project passes (72 passed).