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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Published size regression: basicminimalapipublishaot, basicminimalapipublishaot, todosapipublishaot #55789

Open
pr-benchmarks bot opened this issue May 19, 2024 · 3 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components area-perf Performance infrastructure issues NativeAOT Perf perf-regression
Milestone

Comments

@pr-benchmarks
Copy link

pr-benchmarks bot commented May 19, 2024

Scenario Environment Date Old Build (KB) New Build (KB) Change Deviation StDev Dependencies
basicminimalapipublishaot Goldilocks Stage 1 (NativeAOT) 7- Native Aot Intel Windows 05/18/2024 00:46:35 52,846 55,582 5.00 % (2,736) 馃憥 228.00 蟽 12
Changes
NameVersionDiff
Microsoft.AspNetCore.App 9.0.0-preview.5.24256.2 -> 9.0.0-preview.5.24266.2 da3aa27...98c6c29
Microsoft.NETCore.App 9.0.0-preview.5.24256.1 -> 9.0.0-preview.5.24265.2 dotnet/runtime@84b3339...1f08a36
basicminimalapipublishaot Goldilocks Stage 1 (NativeAOT - Server GC) 7- Native Aot Intel Windows 05/18/2024 00:47:38 52,846 55,581 5.00 % (2,735) 馃憥 227.00 蟽 12
Changes
NameVersionDiff
Microsoft.AspNetCore.App 9.0.0-preview.5.24256.2 -> 9.0.0-preview.5.24266.2 da3aa27...98c6c29
Microsoft.NETCore.App 9.0.0-preview.5.24256.1 -> 9.0.0-preview.5.24265.2 dotnet/runtime@84b3339...1f08a36
todosapipublishaot Goldilocks Stage 2 (NativeAOT) 7- Native Aot Intel Windows 05/18/2024 00:52:14 101,451 106,261 4.00 % (4,810) 馃憥 167.01 蟽 29
Changes
NameVersionDiff
Microsoft.AspNetCore.App 9.0.0-preview.5.24256.2 -> 9.0.0-preview.5.24266.2 da3aa27...98c6c29
Microsoft.NETCore.App 9.0.0-preview.5.24256.1 -> 9.0.0-preview.5.24265.2 dotnet/runtime@84b3339...1f08a36

PowerBI Dashboard

@sebastienros
@eerhardt

@pr-benchmarks pr-benchmarks bot added area-perf Performance infrastructure issues Perf perf-regression labels May 19, 2024
@eerhardt
Copy link
Member

This appears to be caused by #55558. Specifically by the usage of System.Linq over value types (in this case System.Double).

Comparing the before and after:

image

You can see that there is 53.5 kB of System.Linq code in the new code.

Expanding this:

image

And then seeing what is bringing that code in shows:

image

Which points to:

result[index] = new PolicyNodeEdge(
// Metadata quality is 0 for the edges that don't have metadata as we prefer serving from the endpoints that have metadata
new NegotiationEdgeKey(kvp.Key, kvp.Value.Select(e => GetMetadataQuality(e) ?? 0).ToArray()),
kvp.Value);

If we would eliminate the usage of System.Linq here, we would go back to (roughly) the size before the change.

cc @javiercn

@eerhardt
Copy link
Member

BasicMinimalApi.mstat.zip

Attached is the mstat and dgml files that can be opened with https://github.com/MichalStrehovsky/sizoscope to see the above information.

@mkArtakMSFT mkArtakMSFT added this to the 9.0-preview6 milestone May 20, 2024
@DamianEdwards
Copy link
Member

Should we consider not including this matcher at all in the slim builder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components area-perf Performance infrastructure issues NativeAOT Perf perf-regression
Projects
None yet
Development

No branches or pull requests

5 participants
@DamianEdwards @javiercn @eerhardt @mkArtakMSFT and others