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
Eliminate boxing allocation #8888
Conversation
This change removes 537,404 bytes of boxed enum allocations while loading GE with the gitextensions repo.
Codecov Report
@@ Coverage Diff @@
## master #8888 +/- ##
==========================================
- Coverage 56.03% 56.03% -0.01%
==========================================
Files 922 922
Lines 65944 65944
Branches 12070 12070
==========================================
- Hits 36951 36950 -1
- Misses 25985 25986 +1
Partials 3008 3008
Flags with carried forward coverage won't be shown. Click here to find out more. |
if (!AppSettings.ShowGitNotes && refFilterOptions.HasFlag(RefFilterOptions.All | RefFilterOptions.Boundary)) | ||
if (!AppSettings.ShowGitNotes && (refFilterOptions & gitNotesOptions) == gitNotesOptions) |
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.
IIRC .NET Core has resolved this allocations, hasn't it? #8522 makes this change obsolete.
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.
Yes, it's not needed under .NET Core. What is the timeline for porting?
Until such a time, I suggest merging this. I ran a trace over GE startup and this was a quick win from the top 30 types allocated on the heap.
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.
then this should go into 3.5 too
.NET5 is likely in next version
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.
Sibling PR targeting 3.5: #8889
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Works for me
|
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.
+1
Proposed changes
This change removes 537,404 bytes of boxed enum allocations while loading GE with the gitextensions repo.
Test methodology
✒️ I contribute this code under The Developer Certificate of Origin.