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

fix: perf #3906

Merged
merged 2 commits into from Oct 4, 2021
Merged

fix: perf #3906

merged 2 commits into from Oct 4, 2021

Conversation

alexander-akait
Copy link
Member

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

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

@@ -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;
Copy link
Member Author

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)

Copy link
Member Author

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
Copy link

codecov bot commented Oct 2, 2021

Codecov Report

Merging #3906 (ead4bc6) into master (1b6e242) will increase coverage by 0.15%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
lib/Server.js 93.80% <100.00%> (+0.19%) ⬆️

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 1b6e242...ead4bc6. Read the comment docs.

@markjm
Copy link

markjm commented Oct 3, 2021

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!

@alexander-akait alexander-akait merged commit f6e2a19 into master Oct 4, 2021
@alexander-akait alexander-akait deleted the fix-perf branch October 4, 2021 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants