Initial opening speed

J

John

Hi

My vb.net seems to be slow on initial loading. My clients are not impressed
as they had used the ms access version of the app previously and think that
the old app is faster in loading. I understand .net apps need to compile
themselves before execution. Is there any way I can speed up this process or
in general do anything else to speed up initial loading of the vb.net app?

Thanks

Regards
 
T

Teemu

John said:
Hi

My vb.net seems to be slow on initial loading. My clients are not
impressed as they had used the ms access version of the app previously and
think that the old app is faster in loading. I understand .net apps need
to compile themselves before execution. Is there any way I can speed up
this process or in general do anything else to speed up initial loading of
the vb.net app?

There is a utility called ngen in .NET Framework's directory. Here is more
information:
http://msdn2.microsoft.com/en-us/library/6t9t5wcf(VS.80).aspx

But unfortunately it is a fact that .NET applications start slowly at the
first time.

-Teemu
 
A

Andrew L

Hi John,

The problem is that it takes time for the .Net Framework to load all
assemblies into memory when it is loaded for the first time. That's the
cause of this delay at the initial start. I believe that you may use the
ngen utility to force the required assemblies to be loaded. Please review
the http://msdn2.microsoft.com/en-us/library/6t9t5wcf(VS.71).aspx article
in the MSDN.

Thanks,
Andrew
 
K

kimiraikkonen

Hi

My vb.net seems to be slow on initial loading. My clients are not impressed
as they had used the ms access version of the app previously and think that
the old app is faster in loading. I understand .net apps need to compile
themselves before execution. Is there any way I can speed up this process or
in general do anything else to speed up initial loading of the vb.net app?

Thanks

Regards

John,
Similar issue had been discussed here with same symptoms.
Unfortunalely, .NET is not as fast as other technologies like VC++,
MFC or VB (6) classics. I think faster memory speeds are a bit helpful
for overcoming on this issue.

http://groups.google.com/group/micr...hl=en&lnk=gst&q=slow+startup#7d003acbe4a4b170

Plus, there's a temporary method which can be applied. As you know, if
you run a .NET application, the second launch of that or an another
application is done much more faster (almost less than one second).
That's why you may want to write an empty .NET application and put
this into startup, it should run automatically and will provide help
to speed up other main applications's initial launch accelerations.
 
C

Cowboy \(Gregory A. Beamer\)

You can ngen your assemblies, but be careful and make sure you have a
version for their machine, as ngen is a native gen utility. If these are
clients, you are best to set up ngen to run on their machine when you
install, as you will be guaranteed to have it ngened for their machine.

If you do not like this route, there are third party tools that compile .NET
assemblies into native code, which essentially makes them non-.NET programs.
This is one option you can try if all other attempts fail.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
T

Teemu

John said:
Thanks. Is there a way to include ngen into the setup?

You can run ngen during the setup process. Ngen is installed on every
computer with .NET Framework.

-Teemu
 
R

Rad [Visual C# MVP]

You can ngen your assemblies, but be careful and make sure you have a
version for their machine, as ngen is a native gen utility. If these are
clients, you are best to set up ngen to run on their machine when you
install, as you will be guaranteed to have it ngened for their machine.

If you do not like this route, there are third party tools that compile .NET
assemblies into native code, which essentially makes them non-.NET programs.
This is one option you can try if all other attempts fail.

You could also have a look at your code and see if you can identify any
bottlenecks. Run it through a profiler like RedGate ANTS or JetBrains
DotTrace. You might be find some bottlenecks where you can improve
performance
 

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