🧼 optimize install size#35
Conversation
commit: |
dreyfus92
left a comment
There was a problem hiding this comment.
overall looks really good. since you're optimizing install size, are you planning on the near future to add a "no size regression test", cause rn there's nothing in the CI that asserts the package stays under a certain size. without that the size could quietly creep back up over time.
Co-Authored-By: ghostdevv <ghostdevbusiness@gmail.com>
- replace sourceMap/declarationMap/target compiler options with skipSourceOutput: true - add type: "module" to package config - remove redundant files: ["esm"] (npm excludes lock files automatically, .npmignore handles the rest) Co-Authored-By: ghostdevv <ghostdevbusiness@gmail.com>
Co-Authored-By: ghostdevv <47755378+ghostdevv@users.noreply.github.com>
Co-Authored-By: ghostdevv <git@willow.sh>
|
There are a couple of optimizations here; some of which I'm 100% cool with, the others I think we need to make sure we do intentionally. Unalloyed Wins:
Needs consideration
|
Just so we don't block this work, can we merge all the other size optimizations and then consider these C options separately in the context of knowing how runtime perf is impacted? |
@cowboyd yep that sounds like the right path forward! happy to split those out with some benchmarks |
Reverts three changes that need benchmarks before landing: - -Oz / wasm-opt - brotli+Z85 wasm compression - wcwidth.c rewrite
Reduces npm install size by 63% (723kB → 268kB unpacked) via:
src/duplication from the npm packageAlso bumps minimum node version to v22 (current LTS).
Future optimization opportunities identified (with unknown performance impact) include:
-02to-0z, addingwasm-optstepwcwidth