top | item 43935236

(no title)

kant2002 | 9 months ago

I think you overestimate ability of Dotnet to trim unused things. As a person who spend a lot of time wandering across ecosystem and measuring what can be done, I would say we have very bulky and complicated libraries in the .Net.

Just bringing HttpClient(without SSL support) add 6Mb of generated code.

Minimal API gets you additional 21 Mb. And we not even talk about desktop applications here.

Reflection is very very core of .Net ecosystem and you cannot reliably trim with how we use it currently

discuss

order

neonsunset|9 months ago

Last time I checked the base web template (the one which uses minimal API) was around 10-12 MB (which is pretty good for something with a full web server, GC, async runtime and more). I’ll message you in private to see what’s going on.

But otherwise yes, reflection is used heavily even when completely unnecessary.