speed up application
-
Hi guys, Our application takes some time to load. I already tried some tricks like the suspend layout when loading combo boxes and only loading them when necessary etc. but it's still slow. Especially the first time. (because of JIT compiler) A while ago there was a link here on CP to some article on the web that enables you to leave the JIT compilation, but I can't find it anymore. If somebody could point me out to that one, that would be great. Any tricks you know to speed up the application is helpful, but we don't want too many code changes. Thanks for your help!
I've found a living worth working for, but I haven't found work worth living for. :beer:
:jig: -
Hi guys, Our application takes some time to load. I already tried some tricks like the suspend layout when loading combo boxes and only loading them when necessary etc. but it's still slow. Especially the first time. (because of JIT compiler) A while ago there was a link here on CP to some article on the web that enables you to leave the JIT compilation, but I can't find it anymore. If somebody could point me out to that one, that would be great. Any tricks you know to speed up the application is helpful, but we don't want too many code changes. Thanks for your help!
I've found a living worth working for, but I haven't found work worth living for. :beer:
:jig:I recommend precompiling the application using NGen. This creates a native image of the application, this makes the application start a little faster and run a little faster. Quick question: How many controls do you use on the form and is the form databound to a lot of datasources? Having a lot of controls on a form makes the application slower, especially when layering them using groupboxes and panels. Also loading from a database the first time (and often after that too) makes the application slow. You can fake the user by loading the data using async methods. This makes the application more responsive. There could be more tricks, but this is what I know at the moment.
WM.
What about weapons of mass-construction? -
I recommend precompiling the application using NGen. This creates a native image of the application, this makes the application start a little faster and run a little faster. Quick question: How many controls do you use on the form and is the form databound to a lot of datasources? Having a lot of controls on a form makes the application slower, especially when layering them using groupboxes and panels. Also loading from a database the first time (and often after that too) makes the application slow. You can fake the user by loading the data using async methods. This makes the application more responsive. There could be more tricks, but this is what I know at the moment.
WM.
What about weapons of mass-construction?WillemM wrote:
I recommend precompiling the application using NGen
That was the thing I lost. Thank you so much. We don't have that many controls, but a lot of data is in them. The entire logic seems simple at the outside, but is very complex at the inside. That's why we loose so much time. Furthermore, on my laptop, speed is acceptable, but the client works on old(er) machines. thanks for your help !!
I've found a living worth working for, but I haven't found work worth living for. :beer:
:jig: -
I recommend precompiling the application using NGen. This creates a native image of the application, this makes the application start a little faster and run a little faster. Quick question: How many controls do you use on the form and is the form databound to a lot of datasources? Having a lot of controls on a form makes the application slower, especially when layering them using groupboxes and panels. Also loading from a database the first time (and often after that too) makes the application slow. You can fake the user by loading the data using async methods. This makes the application more responsive. There could be more tricks, but this is what I know at the moment.
WM.
What about weapons of mass-construction?Can I ask you a little question: I've found this article -> Ngen[^]. As I understand correctly it doesn't change anything in your exe, it just has a compiled 'image' in a service. this would mean I need to use ngen again if I install on another cpu. Here's my problem: The NGen tool comes with VS2005 and on the client machine we only have the framework installed. So what did I miss? again, tnx for your help!
I've found a living worth working for, but I haven't found work worth living for. :beer:
:jig: -
Can I ask you a little question: I've found this article -> Ngen[^]. As I understand correctly it doesn't change anything in your exe, it just has a compiled 'image' in a service. this would mean I need to use ngen again if I install on another cpu. Here's my problem: The NGen tool comes with VS2005 and on the client machine we only have the framework installed. So what did I miss? again, tnx for your help!
I've found a living worth working for, but I haven't found work worth living for. :beer:
:jig:NGen is part of the .NET Framework, not Visual Studio. For 1.1, you'll find it in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
NGen is part of the .NET Framework, not Visual Studio. For 1.1, you'll find it in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
NGen is part of the .NET Framework, not Visual Studio. For 1.1, you'll find it in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322.
Dave Kreskowiak Microsoft MVP - Visual Basic
I also have a question abour pre compilation. Doesnot we need to precompile on different hardware Configuration? A best Precompiled Image of assembly may not even good at your hardware? Am I right? Or please give me some more info. Best regards, Rizwan Ahmed
-
I also have a question abour pre compilation. Doesnot we need to precompile on different hardware Configuration? A best Precompiled Image of assembly may not even good at your hardware? Am I right? Or please give me some more info. Best regards, Rizwan Ahmed
NGen generates binaries that are VERY processor specific. If you use NGen on a Pentium IV, the code won't work on a Pentium III. NGen is best used during application installation. After the app is installed, you can have a Custom Action precompile any/all of your assemblies so as to reduce the startup time as much as possible.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
NGen generates binaries that are VERY processor specific. If you use NGen on a Pentium IV, the code won't work on a Pentium III. NGen is best used during application installation. After the app is installed, you can have a Custom Action precompile any/all of your assemblies so as to reduce the startup time as much as possible.
Dave Kreskowiak Microsoft MVP - Visual Basic
Exactly this is what I was thinking of. Can you point any article that uses acustom action? Do I have to make a seperate application for precompiling it using System.Diagnostics.Process.Start()??? Best Regards, Rizwan
-
Exactly this is what I was thinking of. Can you point any article that uses acustom action? Do I have to make a seperate application for precompiling it using System.Diagnostics.Process.Start()??? Best Regards, Rizwan
-
Thanks, I check it Regards
-
I also have a question abour pre compilation. Doesnot we need to precompile on different hardware Configuration? A best Precompiled Image of assembly may not even good at your hardware? Am I right? Or please give me some more info. Best regards, Rizwan Ahmed