-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
Description
In #56460 (comment) we are making SignalR server compatible with native AOT. Investigating the extra 2.2 MB
of app size in a SignalR app over the dotnet new webapiaot
template, the largest difference that can be trimmed is from cutting System.Text.RegularExpressions
out of the app. The reason it gets pulled in is because this calls AddRouting
and not AddRoutingCore
.
aspnetcore/src/SignalR/common/Http.Connections/src/ConnectionsDependencyInjectionExtensions.cs
Lines 21 to 23 in 0da8ea7
public static IServiceCollection AddConnections(this IServiceCollection services) | |
{ | |
services.AddRouting(); |
In the past investigations, Regex adds roughly 750 KB
of app size in native AOT (see #46142 and #46227). We added AddRoutingCore
for this specific reason.