How does multiple assemblies affect performance?

  • Thread starter Thread starter PGP
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top