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
|
|||||||||
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
|
|||||||||
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
|
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:
You can see that there is 53.5 kB of System.Linq code in the new code.
Expanding this:
And then seeing what is bringing that code in shows:
Which points to:
aspnetcore/src/Http/Routing/src/Matching/NegotiationMatcherPolicy.cs
Lines 287 to 290 in 94ad1d4
If we would eliminate the usage of System.Linq here, we would go back to (roughly) the size before the change.
cc @javiercn
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?