-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Switch to api.ast.json.gz instead of api.ast.json #441
Conversation
Hi Somhairle, I'm seeing out of disk space problems in the GitHub runners trying to update v8 in workerd (#437). This saves a couple of GB disk space and might open a path forward for the v8 update. PTAL, thanks! |
56b9cbb
to
ee760b5
Compare
As far as I can see the AST is only used when generating the JSON types here – that code wouldn't support gzipped inputs out of the box, right? |
Never mind, just noticed you're adding ungzip support in param-extractor.rs and the input for the TypeScript code itself is uncompressed |
Hi Felix, thanks for looking into the change. You're right: we're just compressing the one file and adding support for decompressing it when it is consumed. With this patch:
Previously:
|
LGTM overall. The only possible downside I can think of is the time spent on compression – the default, unoptimized gzip can be quite slow. It looks like there is no big impact on the CI build time here, but have you tried what impact e.g. |
-3 reduces the compression time here from 20s to 13s and increases file size (140MB vs 100MB). |
api.ast.json consumes 2.5GB in the output directory, compressing it saves 2.4GB of storage. The saving is useful in devhouse and for github actions (linux SSD size 14GB). Test: build bazel //... && bazel test //...
ee760b5
to
373a11b
Compare
The latest update has "gzip -3", it seems like a good trade-off and we still have a massive large size saving. Thanks! 373a11b |
Thanks for this @ohodson! I'll have a check over the output later today (I'm not super sure whether the type parsing tests cover parameter extraction) |
api.ast.json consumes 2.5GB in the output directory, compressing it saves 2.4GB of storage. The saving is useful in devhouse and for github actions (linux SSD size 14GB).
Test: build bazel //... && bazel test //...