straight-skeleton icon indicating copy to clipboard operation
straight-skeleton copied to clipboard

Bundle size optimization (currently 1MB minified)

Open ricokoiv opened this issue 10 months ago • 3 comments

Hey!

I was going over all of the installed packages that our application is currently using and found out that Straight Skeleton v2.0.1 is the largest chunk of it. Would there be a way to reduce the package size or has it already been minifed to the smallest size?

Bundlephobia is showing 1 MB as the minifed size of the package.

Thanks a lot, Rico

ricokoiv avatar Mar 14 '25 09:03 ricokoiv

I'm pretty sure this is the smallest I could bring it to. The Wasm build contains quite a lot of boilerplate that's not 100% utilized, so there might be ways to strip some parts of it, but I never really looked that deep into this problem.

StrandedKitty avatar Mar 14 '25 16:03 StrandedKitty

I’m working on translating the v1 branch to pure JavaScript with a full set of unit tests. My plan is to be able to send the results to threejs for the rendering.

I don’t know if that helps or not.

https://github.com/Beakerboy/straight-skeleton/tree/dev

Beakerboy avatar May 17 '25 20:05 Beakerboy

My pure Javascript version seems to be working. I have translated a bunch of tests from the original version, and they are passing.

Beakerboy avatar Jun 13 '25 13:06 Beakerboy