Speeding up runtime of a app

Status
Not open for further replies.

LostProgrammer

Centurion
Joined
Jan 17, 2003
Messages
123
Last question, I promise.:D

I have the app up and running and I placed the .exe file out on a network drive. I then created shortcuts for 8 machines to run the program and log there time. 5 of these machines are windows 98, 2 are 2000 and 1 is xp. The one that runs xp executes the program (displays the form) in about 4 seconds. The 2000 machines execute in usually 5- 20 seconds. The 98 machines execute in atleast 30 seconds - 2 minutes time. The executable file is only 30kb, I just can not figure out why it would take so long to start up this program. I am wondering if I have to compile the program in a special way or set some options so that it can start the program faster. My best guess is that when the icon is clicked the program is compiled and is running in some kind of verbose debugging mode or somthing and this is why it takes so long for certain machines to start it up.

Can anyone help me out, I am kinda trialing .net for my company to see if we want to jump to it. My boss is kinda nervous when he sees a 30kb .exe file take 2 minutes to open, it makes him a bit jumpy.

Oh I almost forgot, once the program displays, you can enter data and what not extremely fast. It is just the startup.

Thanks for all the help

LP
 
First, I wouldn't run the EXE from the network (as Robby suggested). You can make a rudimentary install that gets it local.

Next, if you determine that running local still takes a long time to load up, you can possibly run ngen on some of the DLLs and/or the exe (maybe?) to compile them to "native" .NET code - this will skip the runtime from JITing all your methods as they're loaded. MS has articles on using ngen to improve application startup performance, especially related to WinForms apps.

For now, you could also add some testing code to your app to record timings. The idea is to see how long it takes from the first line in "Main" to your class's constructor to Form Load, etc. Display it in a message box or somesuch for now - just to see where the slowdown is. Maybe it's all in Windows and .NET and ngen will help or maybe it's someplace else.

-Nerseus
 
Its deffinatly not a network issue, cause I just tried copying the exe to the machine locally and they have very similiar performance. Actually I can not tell the difference between the local copy and the intranet copy.


Soooo I am guessing I need to precompile the forms, because its not my code that is slow (its only like 100 lines) but its the startup that is so slow. So is there a way to precompile the forms so that it will speed up the startup of the program for my users?

Oh and I have heard of ngen, but I was not sure how to use it. Does anyone have any links to some useful info on its use?

Thanks for all the help

LP
 
Did you run the apps more than once? Because the first time it's run it will recompile. The second time should be faster.
 
Dear
This is a common Issue with .NET application they run Faster with WINDOWS XP environment. i have tested a lot of applications on many platforms and i have seen one thing if you are going to deploy .NET application always use Windows XP. althought these application can run on all 32Bit OS offerd by Microsoft but their internal structure is entirely different from those application develop in past using VB6 of C++.
Yes ,This is not an issue of network. coz application is not soo much heavy. and obviosly .NET RunTime Framework is installed on every machine running Windows 98 and 2000.
on in my point of view it is better to use Windows XP on all systems.
 
Dear Rooby
I am not talking about the CORE or shell, i hope you will say Windows NT server and 2000 Advanced Server are same,both are 32 bit windows,
Windows XP is specifically designed for .NET.
 
I don't know how true that is... .NET came out after Windows XP,
and designing an operating system around a beta of a language
framework doesn't seem like the smartest of ideas. It may have had
some special consideration/optimization for the basic concepts, but I don't
think that it was "specifically designed" for .NET. If it was, it probably
would have been released around the same time as .NET, rather
than 4-5 months earlier.


I don't know though; someone who knows more about this than I
do should clear this up.
 
The fact that XP was released before .NET was finalized should
tell you that they didn't integrate is too heavily. I'm not saying
that they didn't take it into consideration, but if they started integrating
the beta version of .NET into XP, they could have run into some
real problems. I think Microsoft is a little smarter than that.

Windows .NET will be the first operating system where .NET is a really
big part of it, I believe.
 
You are right Volta Force.
but the main thing which i wanted to tell and Robby was not accepting that
Execution of .NET applications on Windows XP is much better then executing that application on Windows 98 or 2000
yes Windows XP was released before VS.NET but it was released as a part of that project and then so on.....
Well I think we should close this topic now and instead of fight with each other we should talk some thing about Developing Applications
 
I believe XP was intended to run faster than previous OS's, including 2000. Win2000 wasn't meant for home users; it was a business platform that was meant to be easy to configure and more stable than any other OS. One of the main selling points for XP was stability, but more importantly it was speed. I can't count how many times I've read about the increased performance the average user will see with WinXP over WinMe, Win98, etc.

WinNT and Win2000 are totally different operating systems. Win2000 is MUCH nicer to work on, more stable, faster, etc. etc.

I can't speak for .NET server as it hasn't been release and you can't truly judge an OS until it is officially out and you've used it for awhile, but I don't believe it's "based" on .NET. It may have more "stuff" built-in to help .NET developers but generally that's only a benefit to professional developers. Meaning, the things the OS will make easier are generally geared towards system services, such as COM+, Message Queuing, etc. Obviously they will be .NET services, but still not things the average developer will be using or worrying about.

Here's a thought: maybe we should split the second half of this thread to a new one under "Random Thoughts" :)

-Nerseus
 
Madz, you can copy/paste all the articles you want,
but I still cannot agree with this statement...
"Windows XP is specifically designed for .NET."

And the topic is not close, we haven't heard from Divil yet :)
 
Perhaps you meant ".NET is specifically designed for XP"? That is
closer to the truth.
 
I've never seen one person spout so much nonsense in one thread - nor have I had to delete as many pointless posts from one!

Windows XP isn't designed especially for .NET, nor vice versa. There are optimizations within .NET for the newer NT platform (that's Windows 2000, Windows XP and Windows 2003 Server). Yes, these all share the same basic kernel.

I suspect Madz is getting confused with Windows codename Longhorn, which supposedly will revolve around .NET a great deal. Windows XP came out a while before .NET, and knows nothing of it out of the box.
 
Status
Not open for further replies.
Back
Top