473,657 Members | 2,422 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 1982
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
9241
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
17293
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
8339
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 give me any hints on how I can better write the SP.
59
4412
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 program is easily able to deal with its own errors." By "conventional error-handling," I believe...
4
1510
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 populating from codebehind was more optimized becase it was pre-
5
1977
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 memory error. Thus the derived classes has additional functionality, not additional data.
11
2645
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 lookup an identical text field in tblPreferredPets.
30
3513
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
4582
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 different technologies. To use the native classes from outside their dlls I use the...
0
8411
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2740
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
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.