Form performance

  • Thread starter Thread starter gr
  • Start date Start date
G

gr

Hi, I build a form with a 6pages tab control. Each page
has a subform and also other controls.
Is this a bad design (thinking on performance) the
analyzer says I should remove some controls for the form.
So what is the "optime" number of controls for a form to
perform good?
 
Personally, I dont know of an absolute 'optimum' value. However, I imagine
it is also variable based on a number of variables.

Some of those to consider will be:
Number of controls on each form. Lots of bound controls mean more data needs
to be loaded, so performance will be affected.
Number of records returned in each recordset. The more records returned, the
more data needs to be loaded, so performance will be affected.
And so on.


I guess the most important thing is what you client is expecting in terms of
useability & performance. If performance is the most important factor, use
subforms which load in seperate windows. If having all the data in one place
is the most important factor, go with the tab controls.

Having said all this, I always prefer to have seperate subforms which load
if there is a lot of data because the performance gain is significant, & I
think more importantly, you can only view the contents of tab at a time, so
why load them all...
 
I often use this approach:

* set the source of the subform controls in every tab to some empty form
(which I usually name fDummy)
* I want to 'unbind' the tab disappearing from view, so I store the
current page number in a variable and reset the subform's source to fDummy
* on change of the tabcontrol, read its Page value, lookup the correct
subform, set the control property accordingly

If you need more information, you can mail me (domain nl). I am
considering turning this into an article for my site.

James said:
I guess the most important thing is what you client is expecting in terms of
useability & performance. If performance is the most important factor, use
subforms which load in seperate windows. If having all the data in one place
is the most important factor, go with the tab controls.

Having said all this, I always prefer to have seperate subforms which load
if there is a lot of data because the performance gain is significant, & I
think more importantly, you can only view the contents of tab at a time, so
why load them all...

I feel the gain is not in performance anyway, but screen real
estate/user interface coherence. I, as user, like to find all related
information in one place. Subforms do well for this purpose, but eat up
space. With the trick above (I'll call it loadCurrent) you can let only
the 'active' subform push on your system's performance.
 
Back
Top