473,837 Members | 1,438 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Preload" Forms for speed?

Hi!
Is there a way to "preload" a form using a thread or something else so that
my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading
of the next form and controls done in the background while a user is still
entering data.

(For example, my user visits screen A then B then C. While the user is
still viewing/entering data on screen A, I would like form B to preload in
the background. The user clicks "next" or whatever on form A and form B is
then displayed. form C would then begin preloading...an d so on.)

Does anyone have any suggestions or advice on what I could do to increase
speed between forms? Is my form flow plan OK? BTW - I'm using VB.NET on
Compact Framework, but I'll gladly accept *any* advice and direction.

Thanks!
--Scott


Nov 20 '05 #1
4 9919
Scott,

Yeah you can pre-load forms (after all they are classes). However, I don't
know how much of a speed increase you'll get (never tested it).

second off all, I am not sure on the Compact Framework as I have never used
that before. What you may want to do is looking up the
System.Threadin g.Thread class on your help cd and see if its supported byt
he compact framework, or find something that is.

Hope it helps,
CJ
"Scott Johnson" <sjohnson_at_so ftaltern_dot_co mDIESPAM> wrote in message
news:vv******** ****@corp.super news.com...
Hi!
Is there a way to "preload" a form using a thread or something else so that my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading of the next form and controls done in the background while a user is still
entering data.

(For example, my user visits screen A then B then C. While the user is
still viewing/entering data on screen A, I would like form B to preload in
the background. The user clicks "next" or whatever on form A and form B is then displayed. form C would then begin preloading...an d so on.)

Does anyone have any suggestions or advice on what I could do to increase
speed between forms? Is my form flow plan OK? BTW - I'm using VB.NET on
Compact Framework, but I'll gladly accept *any* advice and direction.

Thanks!
--Scott

Nov 20 '05 #2
At the loading of the main for, declare and initialize an instance of each
form you want either within the main form or create a class with a shared
property for each form. - this will slow loading up but you'll have them all
in memory. Then you can make the forms visible as necessary depending on
what the user wants to do. If you bind them to the main form, you'll have
limited access to everything from the subsequent forms, so you'll probably
want to use a module or create the forms as shard properties of a class.

This link may also be of help...in the CF, you need to squeeze out every lit
bit of efficiency you can
http://msdn.microsoft.com/library/de...rmloadperf.asp

HTH,

Bill
"Scott Johnson" <sjohnson_at_so ftaltern_dot_co mDIESPAM> wrote in message
news:vv******** ****@corp.super news.com...
Hi!
Is there a way to "preload" a form using a thread or something else so that my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading of the next form and controls done in the background while a user is still
entering data.

(For example, my user visits screen A then B then C. While the user is
still viewing/entering data on screen A, I would like form B to preload in
the background. The user clicks "next" or whatever on form A and form B is then displayed. form C would then begin preloading...an d so on.)

Does anyone have any suggestions or advice on what I could do to increase
speed between forms? Is my form flow plan OK? BTW - I'm using VB.NET on
Compact Framework, but I'll gladly accept *any* advice and direction.

Thanks!
--Scott

Nov 20 '05 #3
My experiences with "speeding up" forms has taught me to
think like a magician. After all, if the
user "perceives" that a form is loading quickly, or
is "responsive " than it doesn't really matter if it
really is taking 5 seconds to initialize. One trick I
use is "amortizing " the long operations. That is, if it
takes 20 seconds to get a result from a database query,
but, you don't need to display everything from the query,
then break up the query into smaller chunks and display
each chunk as it becomes available. So if it takes 3
seconds to get your first result, then 7 seconds for the
second result and then 10 seconds for your final result,
if you start by displaying the first result in 3 seconds
your gui will seem faster (even though 3 + 7 + 10 = the
original 20 seconds--the user only had to wait 3 seconds
for the gui to display a result). It's all "smoke and
mirrors". When it comes to initializing multiple windows
(or tabs) you can "spread out the pain" by starting the
initialization of the longer running operations first.
Using multiple threads can help with the "amortizati on"
of the initialization of your multiple windows (or tabs)
but you must take the extra precaution of "synchroniz ing"
the various threads so that your "main window" thread
doesn't display a partially initialized view. You must
also handle the case where your main thread gets
terminated before the "secondary" threads get an
opportunity to complete. After all, you don't want to
write to a window that has been closed!
-----Original Message-----
Hi!
Is there a way to "preload" a form using a thread or something else so thatmy user doesn't have to wait 5 seconds (initializing time) between forms?Some of these forms have tab strips with lots of controls and databasequeries on them and I would like to try to have some (all) of the preloadingof the next form and controls done in the background while a user is stillentering data.

(For example, my user visits screen A then B then C. While the user isstill viewing/entering data on screen A, I would like form B to preload inthe background. The user clicks "next" or whatever on form A and form B isthen displayed. form C would then begin preloading...an d so on.)
Does anyone have any suggestions or advice on what I could do to increasespeed between forms? Is my form flow plan OK? BTW - I'm using VB.NET onCompact Framework, but I'll gladly accept *any* advice and direction.
Thanks!
--Scott


.

Nov 20 '05 #4
Thanks for the replies! I'll give em a try.
"Scott Johnson" <sjohnson_at_so ftaltern_dot_co mDIESPAM> wrote in message
news:vv******** ****@corp.super news.com...
Hi!
Is there a way to "preload" a form using a thread or something else so that my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading of the next form and controls done in the background while a user is still
entering data.

(For example, my user visits screen A then B then C. While the user is
still viewing/entering data on screen A, I would like form B to preload in
the background. The user clicks "next" or whatever on form A and form B is then displayed. form C would then begin preloading...an d so on.)

Does anyone have any suggestions or advice on what I could do to increase
speed between forms? Is my form flow plan OK? BTW - I'm using VB.NET on
Compact Framework, but I'll gladly accept *any* advice and direction.

Thanks!
--Scott

Nov 20 '05 #5

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

Similar topics

3
1756
by: Bob | last post by:
I usually use some "pre-load" code in my pages to preload graphics that will be swapped. But, I'm thinking that rather than the long, repetitive, once, for each graphic hardcoded stuff like this: var bb_off = new Image(); bb_off.src = "images/bb_off.jpg"; ....that I could have an array where I just listed the names of the graphics, a loop, and code in the loop that cycles through each entry in the array to create and pre-load the "on"...
1
3392
by: Stacey | last post by:
Hi, I'm hoping for a bit of advise-- I have a (relatively, from the point-of-view of this dilettante) complex script that attempts to preload certain images in order to trigger one of a series of six slideshows (rather than try to articulate, have a look here): http://www.slack.net/~stacey/stestbed/homejs.jsp Clicking any of the six blocks of text along the sides will begin a loop of the corresponding slideshow.
2
4657
by: ChInKPoInt [No MCSD] | last post by:
1. Is there anyway to preload password? Text attribute doesn't work <asp:TextBox ID="Pass" TextMode="Password" Runat="server" Text="Hello"> 2. In the same form, if other elements such as <asp:dropdownlist...> is using AutoPostBack="true". When the form posts back to itself, the password textbox is cleared??? is there anyway to maintain the password during autopostback? Thanks..
1
2017
by: mmcc128 | last post by:
Currently using the "document.images" to "preload" images - not for future pages, but for the page being loaded. I got it from http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm Its a nice script - pops up an img on mouseover. I understand that its downloading SOMETHING - but its not rendering.... THE QUESTION: How does "preloading" these images (into cache, as I have read) affect page size, page load, etc. I cannot find...
1
3191
by: booniraj | last post by:
Hello, i wanted to disply preload on dtml page.. can you help me in this...? cheers Rajeev
26
3918
by: Jake Barnes | last post by:
I did a search on the newsgroup comp.lang.javascript. I was searching for "how to play a sound with Javascript". I'm somewhat suprised that the majority of entries are from the 1990s, and there are almost no posts from the last 3 years: http://groups.google.com/group/comp.lang.javascript/search?group=comp.lang.javascript&q=how+to+play+a+sound+with+Javascript&qt_g=Search+this+group Even after sorting by date, there don't appear any...
4
1407
by: Robert Cramer | last post by:
I am needing to create a sort of "plug-in architecture" whereby different Web sites I maintain on the same server have slightly different functionality. Some Web sites will need to use the functionality in some assemblies, while others will get similar functionalilty from different assemblies. What I was thinking about doing - and I'd apprecaite your feedback on this - is to load the assemblies required by a particular site into the...
4
8431
hemantbasva
by: hemantbasva | last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even onactivetabindexchanged we have called a method loadtabpanel() which is defined in javascript in same page.the problem is it sometime give the message load tab panel undefined. this error does not come regularly. it comes in usercontrol rendering . i...
0
9842
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9682
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10874
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10623
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10271
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4040
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3124
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.