Skip to content

Minor perf fixes for LazyItemEvaluator#6529

Merged
rainersigwald merged 1 commit intodotnet:mainfrom
AR-May:DecorateItemsWithMetadata-perf-improvements-2
Jun 17, 2021
Merged

Minor perf fixes for LazyItemEvaluator#6529
rainersigwald merged 1 commit intodotnet:mainfrom
AR-May:DecorateItemsWithMetadata-perf-improvements-2

Conversation

@AR-May
Copy link
Copy Markdown
Member

@AR-May AR-May commented Jun 7, 2021

Fixes #6062

Context

Minor fixes for the LazyItemEvaluator: unnecessary memory allocations were removed.

Testing

Manual testing.

Copy link
Copy Markdown
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@ladipro ladipro left a comment

Choose a reason for hiding this comment

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

Have you measured how many allocated bytes it saves when evaluating a typical .NET Core project? Thank you!

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Jun 13, 2021
@AR-May
Copy link
Copy Markdown
Member Author

AR-May commented Jun 14, 2021

Well, according to my measurements, the number of metadata items for OrchardCore is 454,671, and for each item we should save 8B, that would give us ~3,46MB. It was likely gen 0 allocations.

@rainersigwald rainersigwald added this to the 17.0 milestone Jun 14, 2021
@rainersigwald rainersigwald merged commit c86ab72 into dotnet:main Jun 17, 2021
@AR-May AR-May deleted the DecorateItemsWithMetadata-perf-improvements-2 branch March 1, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Performance merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DecorateItemsWithMetadata is 3x slower for netcore projects

4 participants