Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove TerserPlugin step for build #16163

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Aug 10, 2021

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 between steps
$ 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

@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #16163 (e4e95aa) into master (3712ee0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16163   +/-   ##
=======================================
  Coverage   76.81%   76.81%           
=======================================
  Files         996      996           
  Lines       52942    52942           
  Branches     6734     6734           
=======================================
  Hits        40668    40668           
  Misses      12049    12049           
  Partials      225      225           
Flag Coverage Δ
javascript 71.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3712ee0...e4e95aa. Read the comment docs.

@zhaoyongjie zhaoyongjie self-requested a review August 10, 2021 09:07
Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://webpack.js.org/plugins/terser-webpack-plugin/
Webpack v5 or above don't need to install TerserPlugin

LGTM

@zhaoyongjie zhaoyongjie merged commit 79e8d77 into apache:master Aug 10, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset-io size/S 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants