Can dll assemblies boost execution speed?

A

Andreas Zita

Hi

I'm trying to figure out why my .net app take ages to start for the first
time. Well over 10 seconds. I'm not doing anything particullary cpu intense
at startup so I'm a bit confused. I have read that it takes "a while" for
the .net framwork to load the first time but this long??
Does anyone have any suggestion that could boost the execution of .net apps?

If I would split my app into different dll:s, could that boost the execution
or does all assembly references load into memory at startup anyway?

/Andreas Zita
 
C

Chris Dunaway

Andreas said:
at startup so I'm a bit confused. I have read that it takes "a while" for
the .net framwork to load the first time but this long??

When first executed, .Net apps must be JIT compiled into native code.
This will account for some of the delay you are experiencing.

To counteract this, you can pre-compile your apps using the ngen tool
that comes with .Net.
 
O

Olaf Baeyens

at startup so I'm a bit confused. I have read that it takes "a while"
for
When first executed, .Net apps must be JIT compiled into native code.
This will account for some of the delay you are experiencing.

To counteract this, you can pre-compile your apps using the ngen tool
that comes with .Net.
Somehow it would be nice if an installer would pre-compile for that machine
during installattion.
This slow first start-up gives the wrong impression that .NET programs are
slow. But it is only the first moment, for the rest it just runs fine.

Also, only the components that are actually used is loaded in memory. So if
you use another function that you did not use yet in your application, then
that part will also be loaded and the first time be very slow.
 

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