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

[Perf] improve performance by optimizing getId #3451

Merged
merged 1 commit into from Oct 6, 2022

Conversation

golopot
Copy link
Contributor

@golopot golopot commented Oct 6, 2022

Screenshot from 2022-10-06 17-16-27

Screenshot from 2022-10-06 17-17-33

Profiler shows it's about 2% faster overall.

@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Merging #3451 (5baa3e0) into master (d0da6bf) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3451   +/-   ##
=======================================
  Coverage   97.62%   97.62%           
=======================================
  Files         123      123           
  Lines        8976     8976           
  Branches     3279     3279           
=======================================
  Hits         8763     8763           
  Misses        213      213           
Impacted Files Coverage Δ
lib/util/Components.js 96.50% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do this in this case since it's inside an abstraction, but this kind of microoptimization is imo crossing the line to where the readability hit isn't worth the performance gain.

@ljharb ljharb added the hacktoberfest-accepted If you're interested in a free shirt, this PR counts towards it. label Oct 6, 2022
@ljharb ljharb merged commit 5baa3e0 into jsx-eslint:master Oct 6, 2022
@golopot
Copy link
Contributor Author

golopot commented Oct 7, 2022

Good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted If you're interested in a free shirt, this PR counts towards it.
Development

Successfully merging this pull request may close these issues.

None yet

2 participants