-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresfeature-diagnosticsDiagnostic middleware and pages (except EF diagnostics)Diagnostic middleware and pages (except EF diagnostics)investigate
Milestone
Description
In investigating size of NativeAOT apps, one area of additional size is app.UseDeveloperExceptionPage().
When comparing the win-x64 sizes before and after adding the app.UseDeveloperExceptionPage()
line, I see the following sizes:
8.99 MB (9,428,480 bytes) - AddRoutingCore()+app.UseRouting()+UseEndpoints+MapGet
9.56 MB (10,031,616 bytes) - AddRoutingCore()+app.UseRouting()+UseEndpoints+MapGet+app.UseDeveloperExceptionPage()
This means adding app.UseDeveloperExceptionPage()
adds about 550 KB of app size.
We should investigate if there is a way to make this feature smaller. One way to make it smaller is #46915. There may be other optimization we could make to reduce app size. For example, maybe eliminating System.Linq
usages. Another option is removing UseDeveloperExceptionPage()
from CreateSlimBuilder and make it optional for the app to add it (possibly putting it into the dotnet new api
template).
cd21h
Metadata
Metadata
Assignees
Labels
area-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresfeature-diagnosticsDiagnostic middleware and pages (except EF diagnostics)Diagnostic middleware and pages (except EF diagnostics)investigate