daveh541 Posted August 11, 2003 Posted August 11, 2003 Hello, my app has a tacontrol with 3 pages. About 20 controls on the first page, and 4 or so on the other 2 (datagrids with a couple of comboboxes to change the view). The run time is a little slow to my liking, and it would be great if I could give it a little kick. Some controls (such as the comboboxes and a couple of textboxes) have their own events, and seem to be accessed when the program is first run. I am wondering if it would be faster to add the handler in the form_load event so that it isn't accessed until the event is actually raised by the user. Also, any other suggestions that could help increase performance would be most welcome. The app is connected to an access database, built using VS.net Standard Edition. Thanks. Quote
*Experts* mutant Posted August 11, 2003 *Experts* Posted August 11, 2003 The best you could do is to optimize your program as much as you can. When you add event handlers shouldnt do any difference. Also did you try to run your application in the Release mode instead of Debug? The applications run faster under rlease mode. Quote
daveh541 Posted August 11, 2003 Author Posted August 11, 2003 thanks for the reply. yea i have it in release mode, and there is a difference in run time, but mainly I'm just looking for any ideas. I have looked at a couple of MSDN articles of performance and optimaztion that I've found through these forums. Speaking of which, one suggestion was to use longs instead of ints due to it being 32 bit. Anyone notice any differences with this? Quote
Administrators PlausiblyDamp Posted August 11, 2003 Administrators Posted August 11, 2003 Was the longs rather than integers a vb6 tip? Under VB.Net an integer is 32-bit (on a 32 bit OS anyway) and a long is now 64 bit. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
daveh541 Posted August 11, 2003 Author Posted August 11, 2003 Yea I don't know where I got this information from either. I did a little research to figure out which article on MSDN it was from, but there was no mention of this. I think I was just lying to myself :p Quote
*Experts* Volte Posted August 11, 2003 *Experts* Posted August 11, 2003 In VB6 it was indeed best to use a Long, because due to the 32-bit architecture of the OS, it is more efficient; however, VB6 is an oddball, because C++ and other languages have always had 32-bit ints. In .NET you should stick with Integers. If it confuses you, the standard types (Integer, Long) are just aliases of less confusingly named types; Int16 is 16-bit (Short), Int32 is 32-bit (Integer), Int64 is 64-bit (Long). They can be used instead if it is more comfortable. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.