472,805 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Speeding up app start time

Jm
Hi all

I know this might sound a little stupid but i thought id better ask anyway
in case there are some things i havent already tried that everybody else
knows. Basically i am wondering if there is any way to speed up the time it
takes for my app to display its first form. There is very little code before
the form loads, pretty much just a line or two to load the images on it but
it still can take quite a while on some machines to start up. Is this
standard with any app because .NET apps take that little bit more to get
going than vb6 ones did ? I have removed references that arent used in the
app to attempt to speed it up, is there anything else i should be looking at
? Any help is greatly appreciated

Thanks
Nov 21 '05 #1
4 1861
"Jm" <ja*****@ihug.com.au> wrote in message
news:cu**********@lust.ihug.co.nz...
i am wondering if there is any way to speed up the time it takes for
my app to display its first form.


There's a utility called ngen, that "pre-links" your assembly into a
"Native Image" that should load faster. I did this for some of my
applications and it /did/ make a difference - they loaded about 2%
faster. Not so good.

If you're running the application from a network share (as I am),
rather than from the loca file system, it takes the Framework a long
time to "find" adn load your assemblies. Try loading any shared
ones into the Global Assembly Cache on the local machine. Doing
/this/ gained me somewhere around a 40% improvement (production
application load time is now around 3-4 seconds).

If everything's running from the local file system, though, there's
probably not much that you can do - it really /does/ take a lot to
get a .Net program off the ground; use SysInternals Process
Explorer (or equivalent) and you'll see just how much "junk" each
one needs to load ... ;-)

HTH,
Phill W.
Nov 21 '05 #2
"Jm" <ja*****@ihug.com.au> schrieb:
I know this might sound a little stupid but i thought id better ask anyway
in case there are some things i havent already tried that everybody else
knows. Basically i am wondering if there is any way to speed up the time
it
takes for my app to display its first form. There is very little code
before
the form loads, pretty much just a line or two to load the images on it
but
it still can take quite a while on some machines to start up. Is this
standard with any app because .NET apps take that little bit more to get
going than vb6 ones did ?


When a .NET application is loaded, the CLR and some huge libraries are
loaded. The JIT compiler will have to translate the MSIL to native code.
You can reduce application start time by creating a native image of the
application on the machine running the application by using "Ngen.exe".
This can be done as part of the application's installation process too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
"Jm" <ja*****@ihug.com.au> wrote in news:cu**********@lust.ihug.co.nz:
Hi all

I know this might sound a little stupid but i thought id better ask anyway in case there are some things i havent already tried that everybody else knows. Basically i am wondering if there is any way to speed up the time it takes for my app to display its first form. There is very little code before the form loads, pretty much just a line or two to load the images on it but it still can take quite a while on some machines to start up. Is this
standard with any app because .NET apps take that little bit more to get going than vb6 ones did ? I have removed references that arent used in the app to attempt to speed it up, is there anything else i should be looking at ? Any help is greatly appreciated

Thanks


..net languages compile into MSIL which is what is in your exe file. The
MSIL has to be compiled at run time into processor specific code. (JIT -
just in time compiling). The MSIL ges compiled as it is used and the
final processor specific code is stored in case it gets called again
when the program is running. Unfortunately this means that there is a
delay each time a component in your program gets used for the first
time, subsequent uses of the item during that program run will be much
quicker. Next time the app starts though it has to be compiled again
from MSIL...
You can do pre-JIT compiling so that the MSIL is compiled before run
time (usually done at install time), and so application start times are
improved. The downside of pre-JIT is that the JIT compiler will optimise
the code better. Look up ngen (native image generator) in the msdn for
help on doing this.
Nov 21 '05 #4
Jm
Hi All

Thanks for the info, i will try the things suggested

Thanks again

"Jm" <ja*****@ihug.com.au> wrote in message
news:cu**********@lust.ihug.co.nz...
Hi all

I know this might sound a little stupid but i thought id better ask anyway
in case there are some things i havent already tried that everybody else
knows. Basically i am wondering if there is any way to speed up the time it takes for my app to display its first form. There is very little code before the form loads, pretty much just a line or two to load the images on it but it still can take quite a while on some machines to start up. Is this
standard with any app because .NET apps take that little bit more to get
going than vb6 ones did ? I have removed references that arent used in the
app to attempt to speed it up, is there anything else i should be looking at ? Any help is greatly appreciated

Thanks

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Timothy Graves | last post by:
I have a quick (pun intended) question for the guru's out there. I have a piece of code where I am validating the input of chancters into a cell in a datagrid. I am using the keypressed event to...
2
by: Robert Wilkens | last post by:
Ok... This may be the wrong forum, but it's the first place I'm trying. I'm new to C# and just implemented the 3-tier Distributed application from Chapter 1 (the first walkthrough) in the...
4
by: Troy | last post by:
Hello all, I was wondering if there is a way to speed up the rendering of a web page to the client browser... In my case, I am retrieving about 60 - 100 rows of data from an SQL Server and I...
10
by: Sarah Smith | last post by:
Hello, I am a bit of a newbie to VB.NET, but not totally new. I took the plunge recently and decided (along with my colleagues), to try to convert/port a VB6 client/server app to .Net. (I'm...
5
by: jcrouse | last post by:
I have a program that is an external viewer. It is launched with a hotkey from within another application. The program has 30 labels that can be displayed. Since the labels may not always be...
11
by: Dan Sugalski | last post by:
Is there any good way to speed up SQL that uses like and has placeholders? Here's the scoop. I've got a system that uses a lot of pre-generated SQL with placeholders in it. At runtime these SQL...
3
by: Mark Reed | last post by:
All, I have built a database recently which resides on a network server which is constantly being re-structured. This is something I have no control over so have had to incorporate a means by...
0
by: lissbpp | last post by:
Hello, Working in .Net 2.0 using NGen to speed up both my warm and cold startup load times. NGen works beautifully for my application; however, it seams that the native image cache is not...
2
by: salad | last post by:
This is a tip on how to speed up listboxes DRAMATICALLY. Persons that would benefit are those that are constantly updating the rowsource of a listbox/combobox in order to filter and sort the data...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.