Repository navigation
Conversation
The size report after "done" read and gzipped every output file on the main thread, and printed one line for each. Up to 50 files, it still does. Above 50, it prints the total of each extension, from one `stat` for each file, and gzips only the scripts and stylesheets, 8 at a time off the main thread. It reads the folders in parallel, since a large site is mostly folders, one for each page. 10k-page bench: the "listing sizes" stage takes ~0.1-0.3 s instead of ~1.1 s, and adds ~5 MB of RSS instead of ~40 MB. Wall time of the build: ~5.0 s -> ~4.2 s. Closes #61
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.
Closes #61. Stacked on #63.
The size report after "done" read every output file and compressed it with
gzipSyncon the main thread, then printed one line for each file. On a 10,000-page site, that took about 1.1 s and printed 10,108 lines.stat. The report reads the folders in parallel, since a large site is mostly folders, one for each page. It compresses 8 files at a time, off the main thread.cli.mdand the readme ofbongodescribe the report.Benchmark
bun run bench site, interleaved A/B against #63 on an M1 Max with Bun 1.4.3: two rounds each, median of 5 runs per round.listing sizesstageThe stage now adds about 3 MB of RSS, against 35–42 MB before. The build writes the same bytes.
Tests: 2 new tests, for the table and for the summary. All 808 pass,
tsc -p .andtsc -p buildare clean, andbun run buildpasses.