Too Slow startup

matraca

Member
Joined
Sep 20, 2006
Messages
14
Programming Experience
Beginner
I have changed from borland c++ to visual basic and im happy i did, but there has been something that i cant understand and figure out.


Every application that i build and complie takes too long to run..is it the .net framework ???? when i compile and application on borland it opens super fast...on vb i even have to do a splash screen so the user doest think that the application is not going to run...hopefully someone here can give me some good pointers and a great explanation...


Thanks to all...
Happy Programming ;)
 
I have not seen slow startups of .Net applications. What are you doing on startup? You could time your startup calls individually to find bottlenecks (use StopWatch class). If you find one there could be other ways of doing it faster, for instance possible different method to achieve same, or multithreading or similar ways of tricking the user to believe the app is up and ready.
 
You havent seen none...OMGGG

What im i doing wrong...every app starts sloww..real slow :eek:


Could you explain a little what StopWatch could do for me >??
 
Last edited:
If you mean startups when running through the Visual Studio debugger I agree that is a little slow, but not so at regular installed release mode app, I think.

There is actually a small delay because of how .Net works, when you build the app it is compiled to Intermediate Language (IL) code, and each time upon startup .Net runtime Just-in-time (JIT) compiler converts it to Native code. This step is very fast, but does take time compared to not taking any time, as with a unmanaged platform compiled executable image. You can improve this minor delay by using the NGEN.exe utility to pre-compile the assembly to native code and have it installed to the systems Native Image Cache (NIC).
 
Actually to be more expecific...after i create .exe on release...it takes too long to open..

Also..i read the doumentation on NGEN...wow dont get it..:(
 
Last edited:
As I said, you can analyze the time of each startup call and take it from there. Use common sense as what really counts, timing an a memory allocation is pointless compared to for instance the time of connect and query a database on start.

NGEN can optimize further when you can do no more yourself.
 
Back
Top