20% faster bootup time #1350

Merged
merged 5 commits into from Jan 9, 2017

Projects

None yet

3 participants

@rauchg
Contributor
rauchg commented Jan 7, 2017 edited

This PR introduces two improvements to the production build:

  • minification (small parsing perf gain)
  • v8 specific heuristics for faster parse time

Overall, from my samples I've been able to reduce bootup time on my Macbook 12 by 20%

rauchg added some commits Jan 7, 2017
@rauchg rauchg bump webpack, babel and include babili feeb7a6
@rauchg rauchg fix for babili ceafb33
@rauchg rauchg add heuristics for faster v8 parsing e477bf3
@rauchg rauchg lint fixes
78ded10
@rauchg rauchg changed the title from This PR introduces two improvements to the production build: to 20% faster bootup time Jan 7, 2017
package.json
@@ -9,7 +9,7 @@
"test": "npm run lint",
"prepush": "npm test",
"postinstall": "install-app-deps",
- "pack": "npm run build && build --dir && babel --no-comments --compact --minified --out-file app/dist/bundle.js app/dist/bundle.js",
+ "pack": "npm run build && build --dir && BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js",
@stefanivic
stefanivic Jan 7, 2017 Contributor

@rauchg just tested this on Windows and i am getting :
'BABEL_ENV' is not recognized as an internal or external command, operable program or batch file.

I added cross-env and i was able to build it like that. Do you think there is a better option for this ?

@rauchg
rauchg Jan 8, 2017 Contributor

:( not sure. @hzoo can we pass it as an option somehow?

@hzoo
hzoo Jan 8, 2017

I think people just use cross-env for that - the env option just reads from process.env - otherwise you would just make your babelrc a js file not in package.json and do whatever you want from there?

@rauchg rauchg fix windows build. infinitely grateful to @stefanivic for helping us …
…test windows
ab94228
@rauchg rauchg merged commit 12ae25a into master Jan 9, 2017

2 of 4 checks passed

continuous-integration/appveyor/branch AppVeyor build failed
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@rauchg rauchg deleted the improve/bootup-time branch Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment