-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove double lookups on SizeLimitedCache<K, V>, improve performance #9949
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
Conversation
bb29d57
to
b2ff6b5
Compare
Rebased onto main. |
@h3xds1nz: Just a ping to let you know that the test failures in this PR were fixed in main, pulling main should fix the failures. |
b2ff6b5
to
ebcfa79
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9949 +/- ##
===================================================
- Coverage 10.99508% 10.95662% -0.03847%
===================================================
Files 3215 3215
Lines 648472 648448 -24
Branches 71534 71530 -4
===================================================
- Hits 71300 71048 -252
- Misses 576170 576410 +240
+ Partials 1002 990 -12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
LGTM
Thank you, @h3xds1nz, for your consistent and valuable contributions. Your hard work is greatly appreciated! 😄 |
@himgoyalmicro Thank you as always :) |
Fixes #4828
Description
While checking out
SizeLimitedCache<K, V>
yesterday, I've noticed the double lookups on the dictionary and today I've found there's already a corresponding issue for it, hence we should fix it for optimal performance as this is used with glyphs/fonts.ArgumentNullException
directly.Remove
had even three lookups, so now it just has one.readonly
have been adjusted.Node
uses auto properties now.10 capacity, 15 unique additions first, 20 lookups
Customer Impact
Improved perfomance.
Regression
No.
Testing
Local build, tests with the class.
Risk
Low, just basically compiler warnings.
Microsoft Reviewers: Open in CodeFlow