lucacasonato / dext.ts

The Preact Framework for Deno
https://deno.land/x/dext
MIT License
241 stars 8 forks source link

Sourcemap and minifying is slow #70

Closed kt3k closed 3 years ago

kt3k commented 3 years ago

I tried to measure the elapsed time of each part of bundling process of our use case with this patch, and I got the following result:

Ensure tsconfig 0.004s
findPages 0.418s
ensureDir 0s
writeTextFile 0.001s
Started building
Finished building 0.591s
Finished sourcemap 42.619s
Finished emit 0.03s
minify 9.578s
Finished bundling (all) 52.874s

80% is spent in creating sourcemap and 18% is in minifying. So if we have options for disabling these, it would be useful for certain situations.

kt3k commented 3 years ago

Ah, const build = (await rollup(rollupOptions)) as RollupBuild; this line doesn't actually perform bundling...

This needs more investigation.. Closing for now.