Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.Net Apps Slow 1

Status
Not open for further replies.

Ladyhawk

Programmer
Jan 22, 2002
534
AU
I have developed a VB.Net application that runs fine but the users are saying that it is slow to load up. I know that the framework does just in time. Is there any way I can force it to compile the whole thing when the application is installed?

Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
Yes - run NGen.exe against your assemblies.

There are some important things to remember about using NGen:
1) Must be run on the target machine, not a developer's machine or a build machine
2) If the target machine's configuration changes (service pack, etc) you'll need to run NGen again.
3) If you change any of the security settings on the target machine, you'll need to run it again.

If one of these things (and there may be some other factors I don't know about) change, the .NET runtime will revert to using the JIT version, so you can't delete the original assemblies once you've NGened them.

Chip H.
 
How would I know if the user has changed the machine configuration or security settings? i.e., how would I know to run NGen on the client's machine?

Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
We had this same problem. The programs run smooth on the dev machines but slow loading on the users machines. In our case this happened because of the ASPNET user acct was not being loaded on the users machines. This is a built in acct that gets loaded with vb.net dev package load. This is a known bug and is supposed to be fixed in .net framework sp2 which is out and you can download. Otherwise to work around it just add a standard user acct on the user machine called ASPNET if this is a security risk you can disable this acct and it will still work for ya. Let me know if this helps.
-Matt
 
It's a VB.NET app not an ASP.NET app... so it wouldn't use ASPNT user acct would it?

Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
Yes it does actually. The ASPNET acct is an account loaded when the dev package gets loaded and was suppose to be loaded on the users machine in .net framework. Which it should be fixed with the .net framework SP2. The adding it manually is just a work around.

-Matt
 
By .net framework SP2, do you mean version 1.1?

Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
Looks like my reply about NGen didn't make it for some reason.

Ladyhawke - The client would have to know to re-run NGen after they changed the configuration of their machine or network security settings. You could provide them with a .cmd file that contains the commands needed to run NGen againt your shipping assemblies to make it easy for them.

Chip H.
 
I don't think I will go down the NGen path because I don't think the users are going to be intelligent enough or remember to run NGen when their machine configuration changes.

Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
I just downloaded it and it tells me that the program that is is supposed to upgrade is missing. I have .net 1.1 on this machine and no applications written in net are installed.
Do I want to load it on my development machine? This one is my teat machine.
 
The only useful thing that I know of SP2 fixing is the ASPNET user acct. Your dev machine will already have that from the dev package install. So in this sense you dont need it but I know I have sp2 loaded on my dev machine and never got that message let me check for a better link.
-Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top