freddyboy
Fri Sep 22 08:50:37 CDT 2006
I found the arcticle it was from msdn magazine march 2006
article title : Practical Tips For Boosting The Performance Of Windows
Forms Apps
the link :
http://msdn.microsoft.com/msdnmag/issues/06/03/WindowsFormsPerformance/default.aspx
freddyboy wrote:
> Thanks Christer
>
> Your application is like ours a form with tabs
>
> I would have done the retrieval on the tab change also but since i'm
> new here and they decided that everything should be loaded at start up
> with a splash screen (I hate this behavior )
>
> now we want only the basic information loaded at start up and load the
> other tabs in the background so when the user changes tab it will
> already be loaded.
>
> thats what the article was about loading data in the backgroud and
> changing the priority if the user chooses a tab not already loaded.
>
> I will take a look at your suggestion though
>
>
> christer.dk@gmail.com wrote:
> > Hi freddyboy,
> >
> > Don't know the magazine, sorry...
> >
> > It's hard to conclude the best solution based on the limited
> > information provided, but you might be doing more in the "GUI" thread
> > than what is normally adviced. Usually, long running tasks like
> > fetching data from database/web serivice should be done in a separate
> > thread. This might, however, force you alter your code a bit and to use
> > the Control.Invoke method, becuase you cannot alter/access controls
> > created in the GUI thread from a different thread. The good side of
> > this is that your application will look more responsive, and you can
> > use progressbars for better user experience. Highly recommendable...
> >
> > You can also delay the fechting of data and initial form setup until
> > the first time it's showed. Example: Recently we did an application,
> > where the user could open the main form with one or many tabs on it.
> > Each tab had to load a lot of data. Instead of fetching all the data
> > for all tabs at form load, we delayed it until the user clicks a tab
> > for the first time (making it visible). Very efficient. You should look
> > at the VisibleChanged event. The user might see the form flicker a
> > little the first time.
> >
> > I hope this helps...
> >
> > Christer