webcomponents / webcomponents.org

Home of the web components community
https://www.webcomponents.org
Apache License 2.0
356 stars 95 forks source link

Compress manifest sources in the database #1405

Closed justinfagnani closed 1 year ago

justinfagnani commented 1 year ago

This lets us handle larger manifests.

I'm testing it with the largest manifest we've encountered so far: @lion/form-core.

I'm using Brotli from node:zlib assuming it's better at compressing JSON with strings that are likely to contain some markup than other methods. So far I'm using default options, but since this is a write-once, read-many operation, we could turn up the compression level.

Many of the changes here are not the actual compression itself, but getting the types setup to force us to compress and decompress at the right locations.

github-actions[bot] commented 1 year ago

A live preview of this PR will be available at the URL below and will update on each commit. = The build takes ~5-10 minutes, and will 404 until finished.

https://pr1405---site-khswqo4xea-wl.a.run.app/

Warning Until our Cloud Run project is public, only authorized users can view the above URL. The easiest way to view it authenticated is to run the following proxy command and visit http://localhost:5453

(gcloud beta run services proxy --project=webcomponents-org-test --region=us-west2 --tag=pr1405 --port=5453 site \
& gcloud beta run services proxy --project=webcomponents-org-test --region=us-west2 --tag=pr1405 --port=6453 catalog)