-
Notifications
You must be signed in to change notification settings - Fork 249
Performance, round 2 #442
Comments
I tried happypack with phenomic before. Only gain 1-2s. I tried it again soon |
Just an idea: find a way to detect if there is any file change (or not) to decide if we need to compile via webpack, or just use previously compiled files. This way we could skip webpack build step (eg: if no files in web_modules has been changed + node_modules tree untouched). This may be convenient when you only write content. |
It sounds like a good idea. But I don't know how hard would it be to implementing such a feature like that. |
Another idea: think about removing webpack (or making it optional, eg: if you just have JS(X), you can just use babel and a "simpler"(faster?) tool like browserify). That can definitely take a thorn out of our side. |
The webpack dll thing should help a lot. Will try to work on that soon as it should not be complicated. |
https://www.npmjs.com/package/hard-source-webpack-plugin
OMG. We have to try this. |
There is 1 place we can improve: disable Uglify plugin for node build (whether production or not) |
I gave hard-source-webpack-plugin a try and it's ridiculous fast
Issues:
|
@thangngoc89 landed a fix for hard-source that gets extract text and uglify working. Please file a issue if that didn't fix those. (I'm not aware enough about phenomic to know if your other stated issues are caused by hard-source or how to build a test to see if it is.) |
@mzgoddard thanks for you work. Phenomic is just a "classic" webpack consumer, nothing fancy. We will take a deeper look and get back to you if needed! |
@mzgoddard Thanks for your quick response. I pushed my work here: https://github.com/MoOx/phenomic/tree/hard-source-wp It doesn't work with UglifyJSPlugin. Step to reproduce:
The second time you trigger the build, you'll receive some error like this:
If you remove UglifyJSPlugin from the plugin stack (by removing the last commit), the error goes away, everything works at expected (as for as I know) and THE BUILD TIME SPEEDS UP 200% (20sec vs 40sec) |
Doing "cd docs && npm install" is incorrect. According to our specific case (package using deps in a folder above itself), we need the some symlink. Just do "npm i && npm run docs" to get the correct setup to run docs properly. |
@MoOx edited my comment above. Does it seem correct to you ? |
Yep! :) |
Closing as it's pretty nice in current master branch. |
Now that perf are back to "normal" (limited by webpack speed), we need to find tricks to make webpack build faster
Maybe
An interesting issue: webpack/webpack#250
Also: http://www.slideshare.net/trueter/how-to-make-your-webpack-builds-10x-faster
The text was updated successfully, but these errors were encountered: