DLLs and performance gain/penalty?

M

Marty

Hi,

I would like to know about DLL and performance gain/penalty in an
application. Let's say that I have a very big application and for
component portability and easy maintenance, we fragmented the
application in a numerous number of sub projects compiled as DLLs. So
those sub project are very easy to use between different applications.

Our application need high level of performance, does the loading of,
let's say, 100s of DLL in memory at startup could cause the application
to run slower during runtime?

How is managed the memory for the application and DLL? Does DLL still
co-exist or are merge together when they are all loaded in memory?

There is no much details about my project, I just want to know about the
overall influence of many DLL.

Is there detailed documentation about that subject? Does anybody had to
face that kind of interrogation and what was your final result about it?

Thank you very much,
Marty
 
F

Frans Bouma [C# MVP]

Marty said:
Hi,

I would like to know about DLL and performance gain/penalty in an
application. Let's say that I have a very big application and for
component portability and easy maintenance, we fragmented the
application in a numerous number of sub projects compiled as DLLs.
So those sub project are very easy to use between different
applications.

Our application need high level of performance, does the loading of,
let's say, 100s of DLL in memory at startup could cause the
application to run slower during runtime?

compared to having everything in 1 dll? no. The advantage of having
everything fragmented into several dlls is that the dll is only loaded
on the first time a type from that assembly is used. So if your code
uses 50% of the types in the first 5 minutes, you still only load
approx half of the assemblies (assuming all types are distributed
equally over all the dlls).

Loading an assembly has a performance hit of course, though 10 100KB
dlls aren't necessarily slower than 1 1000KB dll.
How is managed the memory for the application and DLL? Does DLL still
co-exist or are merge together when they are all loaded in memory?

They aren't merged, they're mapped into the appDomain's memory space.

FB

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top