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
speed up incremental builds by not doing excessive stats.toJSON work #1362
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1362 +/- ##
=======================================
Coverage 79.14% 79.14%
=======================================
Files 6 6
Lines 494 494
Branches 160 160
=======================================
Hits 391 391
Misses 103 103
Continue to review full report at Codecov.
|
lib/Server.js
Outdated
@@ -25,7 +25,7 @@ const createLog = require('./createLog'); | |||
const OptionsValidationError = require('./OptionsValidationError'); | |||
const optionsSchema = require('./optionsSchema.json'); | |||
|
|||
const clientStats = { errorDetails: false }; | |||
const clientStats = { errorDetails: false, chunkSortMode: 'none', chunks: false }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can even go with
{ all: false, assets: true, warnings: true, errors: true, errorDetails: false }
since these are the only fields used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@sokra - can you please merge after my update? |
@kenotron just wait @shellscape review |
@evilebottnawi @kenotron I no longer maintain this repository. My efforts and recommendation are directed to |
@shellscape I think we should maintain package only for bug fix, many people not yet moved to webpack@4 and webpack-serve. I agree what we don't should add new feature. But this PR fix perf bugs and i think we should merge and do patch release. |
@evilebottnawi from an objective standpoint I would agree that a performance improvement is not a new feature and would fall into the category of "maintenance." |
@shellscape let's do this 👍 |
@shellscape would you mind taking this change? Not everyone in the world can afford to move to the next new thing. I think this little bit of maintenance mode change would benefit quite a LOT of people who still must stick with patch / minor changes. |
@kenotron I don't think you understand - I am not a maintainer of this repo, hence I cannot make these changes. I was only asked for my opinion on the change. I'll be unsubscribing from this thread now, as I don't care for it when users levy unfair accusations at me. |
@sokra - can you merge this? |
Fix released in webpack-dev-server@3.1.2. Thanks @kenotron! |
Note that this broke HMR, which was fixed in e1b263a. |
@kenotron I am curious if the above fix has any negative performance implications? If so we could perhaps only enable the |
@SpaceK33z the hash option didn't significantly do anything to our build times, so I think it's probably okay to leave it be. I'd report another bug if we noticed any anomalies. |
For Bugs and Features; did you add new tests?
There's no need to add tests, as it is just a configuration change to toJSON
Motivation / Use-Case
The stats.toJSON call is done every time an incremental build finishes. Given a sufficiently large codebase, this is very SLOW (my repo went from ~30s to ~10s just by getting rid of this)
Breaking Changes
None
Additional Info