Skip to content

cli: the size list reads and gzips every output file #61

Closed

Description

@lukeed

After "done", bongo build prints one line for each file in public/, with its size and its gzip size. To get these, log.sizes() in packages/bongo/src/utils/log.ts reads every output file and compresses it with gzipSync, on the main thread.

On the 10,000-page site of bun run bench (#56), this takes 1.0–1.6 s and prints 10,108 lines. The wall time of that build is 5.2 s on branch stream. The time comes after the "done in" line, so the line understates the build.

Directions

  1. By default, print a summary: the number of files and their total size, plus one line for each script and stylesheet. Show the full table with a flag, such as --debug.
  2. Compress with the async zlib functions, a few files at a time, if the gzip sizes stay.
  3. Count the time of the size report in the "done in" line, or print it after the table.

This changes the output of the CLI. No doc describes the table today.

Measure

bun run bench site: the wall time and the writing pages row, which includes the report today.

Activity

  1. added
    enhancement
    on Oct 15, 2026
  2. added a commit that references this issue on Oct 15, 2026
    d921523
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions