Does the import have an "irrelevant" dll that has performance limitations?

I am using C #. In many cases, I write code that can benefit from a very simple class / method, which is in an “irrelevant” dll. For example, I am writing some kind of algorithm without an interface, but it can benefit from the Point class in System.Drawing, or I need some kind of xml manipulation method from System.Web, although I am writing a console application (these are just examples).

Besides the “smell of code” - is there a performance limitation for importing a large assembly for a small part of the functionality?

+4
source share
2 answers

Yes, there is a performance limitation associated with downloading assemblies (for example, downloading assemblies requires verification and takes up the address space of your process), but it may not be significant , so you should check how your application is affected. Most likely, this will not be a big problem.

+2
source

Not really. Build size does not matter, so this is just 1 DLL. You probably already have 10 to 30, and downloading 1 is additionally very cheap.

+2
source

Source: https://habr.com/ru/post/1303654/


All Articles