How does multiple assemblies affect performance?

P

PGP

Hello,

Environment: VS2008, .NET CF 3.5, C#, Windows Mobile 6.

I am trying to keep database access, business logic etc to a separate
assembly (<Application>.Core). So currently i have the application exe which
is dependent on the application.core assembly. Just wondering if this
assembly boundary is going to cost me in loadtime/runtime

TIA
Priyesh
 
C

Chris Tacke, eMVP

No, there is no penalty after assembly load. Managed assemblies are used as
memory-mapped files by the loader and therefore are treated much, much
differently than native assemblies.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
P

PGP

Chris,
What about the fact that there are two assemblies? Would the initial
load time be any different if they are merged to one? As far as the JITing
process, does it have to do any additional work when there are multiple
assemblies(i mean as in security, initialization etc)?

Priyesh
 
C

Chris Tacke, eMVP

Loading the assembly will take some time, but it's simply a mapping
operation, so I suspect it's quite fast and it only happens once.

For the JIT it makes no difference. The assembly is already mapped so it
becomes a "read from this address and do your thing" operation and nothing
more. The same thing happens if they are in the same assembly or a
different one, the base address is just different.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top