1. #1
    Sencha User
    Join Date
    Jul 2007
    Posts
    30
    Vote Rating
    0
    disller is on a distinguished road

      0  

    Default Answered: Performance when setting visible attribute

    Answered: Performance when setting visible attribute


    Hi There,

    I have an application with two grid with a toolbar on the top, click rows in each grid will cause some buttons in toolbar to show and some to hide (totally about 15 buttons). I found the process is really slow which can take 4s.

    Anyone can provide some idea to speed up the process, thanks

  2. Call Ext.suspendLayouts() before you start iterating over your buttons and when you're done call Ext.resumeLayouts(). This is available as of Ext 4.1.1.

    Each and every hide and show action causes your toolbar to force a layout run which is very performance critical. So just try the above mentioned and see if it helps.

    Or you could always show the button but enable / disable them (this is what I usually do so the user won't get irritated by "appearing" buttons...). By doing it this way no layout runs are necessary as there are only CSS classes applied and events are suspended.

    HTH
    Florian

  3. #2
    Ext JS Premium Member
    Join Date
    Jan 2008
    Location
    Germany, Berlin
    Posts
    135
    Vote Rating
    11
    Answers
    21
    fschaeffer will become famous soon enough

      1  

    Default


    Call Ext.suspendLayouts() before you start iterating over your buttons and when you're done call Ext.resumeLayouts(). This is available as of Ext 4.1.1.

    Each and every hide and show action causes your toolbar to force a layout run which is very performance critical. So just try the above mentioned and see if it helps.

    Or you could always show the button but enable / disable them (this is what I usually do so the user won't get irritated by "appearing" buttons...). By doing it this way no layout runs are necessary as there are only CSS classes applied and events are suspended.

    HTH
    Florian

Thread Participants: 1

Tags for this Thread