Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Initial opening speed

0 views
Skip to first unread message

John

unread,
Feb 22, 2008, 10:04:07 AM2/22/08
to
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


Teemu

unread,
Feb 22, 2008, 11:48:46 AM2/22/08
to

"John" <Jo...@nospam.infovis.co.uk> kirjoitti viestissä
news:%23jUgpQW...@TK2MSFTNGP04.phx.gbl...

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

Andrew L

unread,
Feb 22, 2008, 11:51:06 AM2/22/08
to
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

"John" <Jo...@nospam.infovis.co.uk> wrote in message
news:%23jUgpQW...@TK2MSFTNGP04.phx.gbl...

kimiraikkonen

unread,
Feb 22, 2008, 12:09:06 PM2/22/08
to

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/microsoft.public.dotnet.languages.vb/browse_thread/thread/e36d3712e4d30b3a/7d003acbe4a4b170?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.

Cowboy (Gregory A. Beamer)

unread,
Feb 22, 2008, 1:50:58 PM2/22/08
to
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!
|
*************************************************


"John" <Jo...@nospam.infovis.co.uk> wrote in message
news:%23jUgpQW...@TK2MSFTNGP04.phx.gbl...

John

unread,
Feb 22, 2008, 10:41:05 PM2/22/08
to
Thanks. Is there a way to include ngen into the setup?

Thanks again.

Regards

"Teemu" <tsi...@hotmail.com> wrote in message
news:c2Dvj.300564$3M3.1...@reader1.news.saunalahti.fi...

Teemu

unread,
Feb 23, 2008, 7:02:05 AM2/23/08
to

"John" <Jo...@nospam.infovis.co.uk> kirjoitti viestissä
news:e9d2o3cd...@TK2MSFTNGP05.phx.gbl...

> 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

Rad [Visual C# MVP]

unread,
Feb 28, 2008, 4:36:57 PM2/28/08
to
On Fri, 22 Feb 2008 12:50:58 -0600, Cowboy (Gregory A. Beamer) wrote:

> 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
--
http://www.thinkersroom.com/bytes

0 new messages