mistercrunch opened a new pull request #16163:
URL: https://github.com/apache/superset/pull/16163
### SUMMARY
Trying webpack without `TerserPlugin`, there doesn't seem to be any impact
on the bundle size, yet we save a bunch of cpu time on the `npm run build`
step. To be fair, when I don't remove the `.terser-plugin-cache/`, the
difference is minimal, but assuming docker isn't doing anything special to keep
that cache active, in that context, or in the context of a new env, the hit is
pretty significant. This only affect `npm run build` but could shave a few
minutes from some of our builds.
```
## Methodology
```
# timing with
$ time npm run build
# cleanup
$ rm -rf .terser-plugin-cache/
$ rm -rf ../superset/static/assets/*
```
## With Terser
```
$ du -sh ../superset/static/assets/
54M ../superset/static/assets/
# first run
real 2m17.742s
user 9m2.984s
sys 0m50.677s
# second run
real 2m31.410s
user 9m16.850s
sys 0m47.766s
```
## Without Terser
```
$ rm .terser*
$ du -sh ../superset/static/assets/
54M ../superset/static/assets/
# first run
real 1m12.785s
user 3m50.063s
sys 0m26.636s
# second run
real 1m35.231s
user 4m54.031s
sys 0m38.375s
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]