-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix: perf #3906
fix: perf #3906
Conversation
@@ -2011,15 +2011,15 @@ class Server { | |||
stats && | |||
(!stats.errors || stats.errors.length === 0) && | |||
(!stats.warnings || stats.warnings.length === 0) && | |||
stats.assets && | |||
stats.assets.every((asset) => !asset.emitted); | |||
this.currentHash === stats.hash; |
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.
@markjm I remove unnecessary ??
check, because it is redundant, when client connected to dev server we always send stats (so we write currentHash), on initial run we send stats too and write hash (client can connected, but compilation can be still not finished, so after it will be finished we should always send stats, it will be never still-ok
)
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.
Also don't forget about disconnect, developer can run dev server again and compilation can take time (i.e. client connected, but no stats right now) and we should send stats always too
Codecov Report
@@ Coverage Diff @@
## master #3906 +/- ##
==========================================
+ Coverage 92.63% 92.79% +0.15%
==========================================
Files 14 14
Lines 1345 1346 +1
Branches 468 467 -1
==========================================
+ Hits 1246 1249 +3
+ Misses 92 90 -2
Partials 7 7
Continue to review full report at Codecov.
|
Looks good, thanks! Also confirming after patching in these changes to our large project we continue to see perf gains. 80th percentile recompile is around 10s for us, and we are really trying to squeeze out more perf wherever we can! Great to see small improvements like this acknowledged and acted upon! |
For Bugs and Features; did you add new tests?
it is just refactor, we don't need assets info here
Motivation / Use-Case
fixes #3905
Breaking Changes
No
Additional Info
No