471,570 Members | 957 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

DLLs and performance gain/penalty?

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
Dec 14 '05 #1
2 1859
Marty wrote:
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

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Dec 15 '05 #2
Hi Frans,
thank you for the information, very interesting.
marty

Frans Bouma [C# MVP] wrote:
Marty wrote:

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

Dec 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Michael Andersson | last post: by
12 posts views Thread by Fred | last post: by
59 posts views Thread by kk_oop | last post: by
4 posts views Thread by Weston Weems | last post: by
30 posts views Thread by galiorenye | last post: by
6 posts views Thread by =?Utf-8?B?RmFiaWFu?= | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.