Is there Performance Penalty for multiple cross-assembly-calls?

Discussion in 'ASP .Net' started by Peter Bär, Jul 16, 2003.

  1. Peter Bär

    Peter Bär Guest

    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 "Basesupport", 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
    Peter Bär, Jul 16, 2003
    #1
    1. Advertising

  2. Peter Bär

    Natty Gur Guest

    Hi,

    I don’t think that any difference will be between the calls. There will
    be difference in the class loading but not in function calls. after the
    assembly load to the caller space there wont be any difference between
    calling class in the same assembly or other assembly calls).

    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur, Jul 17, 2003
    #2
    1. Advertising

  3. Hello Vienna,

    Based on my experience, once the library is loaded by .NET framework, it resides in memory and there should not be
    obvious performance penalty from it.

    I am glad to recommend one good article to you.
    "Performance Tips and Tricks in .NET Applications"
    http://msdn.microsoft.com/library/en-us/dndotnet/html/dotnetperftips.asp?frame=true

    I believe it could help you much in tuning your .net applications. Thanks.

    Best regards,
    Yanhong Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !Subject: Is there Performance Penalty for multiple cross-assembly-calls?
    !From: "Peter Bär" <>
    !Message-ID: <Xns93BADE56B1767fiowenbvn9u0wkfebkwe@213.229.60.102>
    !User-Agent: Xnews/5.04.25
    !NNTP-Posting-Host: 62.99.176.82
    !Date: 16 Jul 2003 21:57:05 +0200
    !X-Trace: e-post.inode.at 1058385425 62.99.176.82 (16 Jul 2003 21:57:05 +0200)
    !Lines: 32
    !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!peernews3.colt.net!
    news0.de.colt.net!news-fra1.dfn.de!newscore.univie.ac.at!e-post.inode.at!not-for-mail
    !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:159708
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !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 "Basesupport", 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
    !
    !
    Yan-Hong Huang[MSFT], Jul 18, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Andersson

    Exceptions performance penalty

    Michael Andersson, Sep 2, 2003, in forum: C++
    Replies:
    7
    Views:
    541
    Oliver S.
    Sep 3, 2003
  2. Yuri Victorovich

    Performance penalty for encapsulations ??

    Yuri Victorovich, Sep 6, 2003, in forum: C++
    Replies:
    1
    Views:
    324
    Kevin Goodsell
    Sep 6, 2003
  3. Sune
    Replies:
    2
    Views:
    322
    Martin Wells
    Oct 2, 2007
  4. Rui Maciel

    dereferencing performance penalty?

    Rui Maciel, Jul 27, 2009, in forum: C Programming
    Replies:
    7
    Views:
    1,474
    Antoninus Twink
    Jul 30, 2009
  5. Rui Maciel

    Function pointers: performance penalty?

    Rui Maciel, Oct 11, 2009, in forum: C Programming
    Replies:
    107
    Views:
    3,947
    Sjouke Burry
    Oct 27, 2009
Loading...

Share This Page