2 ms·
I don't think that's accurate at all. Watching Chrome's network profiler it's pulling down 2.5MB .wasm for the star fiddle: https://jsfiddle.skia.org/canvaskit/
by kllrnohj 7y ago
I don't think that's accurate at all. Watching Chrome's network profiler it's pulling down 2.5MB .wasm for the star fiddle: https://jsfiddle.skia.org/canvaskit/ea89749ae8c90bce807ea2e7e34fb7b09b950cee70d9db0a9cdfd2d67bd48ef0 https://jsfiddle.skia.org/canvaskit/ea89749ae8c90bce807ea2e7...
50KB Gzipped seems like it's just the wrapped JS code, not the .wasm code.
- pier25 7y agoThe NPM package doesn't list any dependencies: https://github.com/google/skia/blob/master/modules/canvaskit/package.json https://github.com/google/skia/blob/master/modules/canvaskit... I'm not saying you are wrong, but if the NPM package needed more stuff it would be in the package.json, no?
- kllrnohj 7y agoI'm more saying bundlephobia.com is wrong in that it doesn't appear to be including .wasm files at all. If you just do an npm install of canvaskit-wasm you'll find a 6.4M canvaskit.wasm file. That'd have to be some insane gzip magic to bring that down to 50Kb. If I gzip the entire canvaskit module (including the font files) I'm getting a size of 3.4M. If I just gzip the .wasm file I get a size of 2.4M.
- pier25 7y agoThanks for checking that out. You are right of course.