About
Currently the start up time for the WASM implementation is brutal (for example, the typescript plugin file is around 6MB all by itself).
This could be partially mitigated by compressing/decompressing the files as needed - and it could be done using nothing more than the native CompressionStream and DecompressionStream APIs.
While the smallest file size (and best compression) is found with the Brotli algorithm, it's currently not supported by the streaming APIs. I've found the brotli compression side of things to be painfully slow (~15s to compress one of the dprint plugin files); I don't think that's an even tradeoff for the minimal gains of about 10-15% smaller compressed file size.
I'll be implementing this in an upcoming PR, along with .ipynb support as mentioned in #3.
Decisions
These questions need to be answered before this can move forward into reality.
Checklist
Things that need to be implemented in order for this feature to ship.
About
Currently the start up time for the WASM implementation is brutal (for example, the typescript plugin file is around 6MB all by itself).
This could be partially mitigated by compressing/decompressing the files as needed - and it could be done using nothing more than the native
CompressionStreamandDecompressionStreamAPIs.While the smallest file size (and best compression) is found with the Brotli algorithm, it's currently not supported by the streaming APIs. I've found the brotli compression side of things to be painfully slow (~15s to compress one of the dprint plugin files); I don't think that's an even tradeoff for the minimal gains of about 10-15% smaller compressed file size.
I'll be implementing this in an upcoming PR, along with
.ipynbsupport as mentioned in #3.Decisions
These questions need to be answered before this can move forward into reality.
.gzor similar added to denote the compression?"gzip","deflate", or"deflate-raw"?Checklist
Things that need to be implemented in order for this feature to ship.
CompressionStream(./update-plugins.ts)DecompressionStream(./dprint.ts)