dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Home Page:https://asp.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Published size regression: basicminimalapipublishaot, basicminimalapipublishaot, todosapipublishaot

pr-benchmarks opened this issue Β· comments

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

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

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.

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