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 "amortization"
of the initialization of your multiple windows (or tabs)
but you must take the extra precaution of "synchronizing"
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...and 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
.