473,387 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 1962
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
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
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
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...
59
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...
4
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......
5
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,...
11
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...
30
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
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.