473,581 Members | 3,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1977
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
application s.

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
9237
by: Michael Andersson | last post by:
Hi! Does the use of exception handling induce a performance penalty during the execution of non exception handling code? Regards, /Michael
12
17288
by: Fred | last post by:
Has anyone a link or any information comparing c and c++ as far as execution speed is concerned? Signal Processing algorithms would be welcome... Thanks Fred
12
8334
by: serge | last post by:
I have an SP that is big, huge, 700-800 lines. I am not an expert but I need to figure out every possible way that I can improve the performance speed of this SP. In the next couple of weeks I will work on preparing SQL statements that will create the tables, insert sample record and run the SP. I would hope people will look at my SP and...
59
4399
by: kk_oop | last post by:
Hi. I wanted to use exceptions to handle error conditions in my code. I think doing that is useful, as it helps to separate "go" paths from error paths. However, a coding guideline has been presented that says "Use conventional error-handling techniques rather than exception handling for straightforward local error processing in which a...
4
1508
by: Weston Weems | last post by:
I currently populate my datagrids manually from a codebehind and use webcontrols within the template columns (for check boxes and viewing pleasure eg labels) For performance and scalability... would late binding where I'd just have <%=myVar%> really be a better way of doing things? I always had thought creating a webcontrol and...
5
1972
by: toton | last post by:
Hi, I want a few of my class to overload from a base class, where the base class contains common functionality. This is to avoid repetition of code, and may be reducing amount of code in binary, not to get polymorphic behavior. None of them has virtual methods, and are self contained (no destructor at all) thus do not have a chance to have...
11
2641
by: Paul H | last post by:
Suppose I have a table called tblPeople and I want a field to illustrate whether each person prefers cats or dogs. I could do it one of three ways. 1. A plain text field Create a text field in tblPeople called PreferredPet. 2. A lookup field that stores text values. Create a text field in tblPeople called PreferredPetID and use it to...
30
3494
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
6
4578
by: =?Utf-8?B?RmFiaWFu?= | last post by:
Hello, I have a class hierarchy distributed over 3 native C++ dlls. The base class has a .NET Windows.Form for status output via a gcroot<>. The gcroot is declared private - the sub classes only have access via a protected "print"-method. I need the different dlls as the sub classes implement the base class's pure virtual methods using...
0
7886
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7809
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8312
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8183
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1413
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.