473,837 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

performance penalty for cross-assembly-calls?

A Question to the C#/.Net Gods of this forum:
are there performance penalties when i compile (C#, FW1.1, ASP.NET,
Studio2003) a central baseclass in a different assembly than all the
derived classes?

f.i. ive got a class dbobject i project "Basesuppor t", compiles to
Basesupport.dll .
From dbobject i derive about 100 classes, thy all are located in Project
XYBiz, so they are compiled to XYBiz.dll.

doughter classes make heavy use of properties, methods and attributes
from the mother class (about 100 per method call)

Now, i dont know whether that design wouldnt produce a performance
penalty for jumping between user dlls, switching contexts, dlls,
whatever.

Approximation one aspx page (resulting in 1 database call(storeproc-
SQLserver)) uses 5 objects, 3 methodcalls each, with - as i said, about
100 cross-assembly-calls. Summed up, thats about 1500 cross-assembly-
calls.

Ok, i know, i know, "code is fast and db is slow, and therefor dont
think about performance, cause db is bottleneck anyways".

But i just wann aknow in principle whether there is no, just a tiny or
noticeable performance penalty from Framework & IIS, when they have to
ping-pong between two user-dlls 1500 times per page call...

Many thanks in advance &
cheers from Vienna

Nov 13 '05 #1
1 2724
Peter,

In the article on MSDN titled "Performanc e Tips and Tricks in .NET
Applications", located at (watch for line wrap):

http://msdn.microsoft.com/netframewo...etperftips.asp

It specifies that performance can be impacted if you don't keep your
working set small. Basically, if you load an assembly for the use of one
method on one object in it, you are going to incur a performance hit
(because you are bloating the type lookup information that is loaded into
the CLR).

However, if you need all of the classes in the assembly, then I wouldn't
see a reason to not do what you are doing. You won't have a problem with
switching contexts because that only happens when you switch threads, and
that isn't affected by how many assemblies you load.

Also, the assembly is loaded into memory and the type information is
stored in lookup tables in memory, so you don't have a boundary when
referencing things in another assembly. You might have another level of
indirection, but I believe it is negligible.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni************* *@exisconsultin g.com

"Peter Bär" <x@x.com> wrote in message
news:Xn******** *************** ***********@213 .229.60.102...
A Question to the C#/.Net Gods of this forum:
are there performance penalties when i compile (C#, FW1.1, ASP.NET,
Studio2003) a central baseclass in a different assembly than all the
derived classes?

f.i. ive got a class dbobject i project "Basesuppor t", compiles to
Basesupport.dll .
From dbobject i derive about 100 classes, thy all are located in Project
XYBiz, so they are compiled to XYBiz.dll.

doughter classes make heavy use of properties, methods and attributes
from the mother class (about 100 per method call)

Now, i dont know whether that design wouldnt produce a performance
penalty for jumping between user dlls, switching contexts, dlls,
whatever.

Approximation one aspx page (resulting in 1 database call(storeproc-
SQLserver)) uses 5 objects, 3 methodcalls each, with - as i said, about
100 cross-assembly-calls. Summed up, thats about 1500 cross-assembly-
calls.

Ok, i know, i know, "code is fast and db is slow, and therefor dont
think about performance, cause db is bottleneck anyways".

But i just wann aknow in principle whether there is no, just a tiny or
noticeable performance penalty from Framework & IIS, when they have to
ping-pong between two user-dlls 1500 times per page call...

Many thanks in advance &
cheers from Vienna

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3053
by: Kenneth McDonald | last post by:
Now that I'm back to Python and all the new (to me) cool features, I find I'm using properties a lot, i.e. I'm defining: foo = property(fset=..., fget=...) for a number of properties, in many of my classes. I'm not using them for anything performance critical yet, but could see myself doing so in the future. Can anyone comment on the performance costs associated with properties vs. simple attribute lookup?
7
9254
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
17314
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
4
3140
by: zzfreddybb | last post by:
We are using HP aCC compiler on a HP Itanium box ( 11.23) We are having some severe performance hits using exception handling ( try/catch ) scenarios. The online aCC documentation says: HP aC++ exception handling has no significant performance impact at compile-time or run-time. We have not found this to be the case at all.
51
3610
by: Jojo | last post by:
Is there any way to get to the left-hand side of an operator? Consider the following (this is not meant to be perfect code, just an example of the problem): class Matrix { public: int data; Matrix() {}
2
1992
by: Marty | last post by:
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...
11
2664
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.
2
1767
by: william.david.anderson | last post by:
Hi there, I'm thinking of using a PREPARE statement inside a stored procedure, but am wondering about the performance penalty associated with calling PREPARE multiple times. Below is an example of the kind of statements I was thinking of using.
2
1686
by: Sune | last post by:
Hi all, there are several situations where integer promotion is performed in C and I need to confirm my understanding of it. Let's contain the discussion to workstation/server CPUs of 32/64 bits, I'm afraid 8/16 bits CPUs may add details I'm not interested in. Hopefully someone here can help out: - As long as I use function prototypes there will be no argument integer promotions (unless they are variadic)
30
3572
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
0
9846
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
10886
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
10580
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
10634
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,...
1
7817
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...
0
7007
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5853
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4479
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
3
3126
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.