Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Slow refresh with selectionAppearance:"checkbox" and (de)select all

    Hi All

    I am trying to use check box in ListGrid with 100 rows and 30 columns on IE 6/7, and it takes roughly about 25-30 sec to select all / deselect all. This is a major performance issue. I am using following

    smartgwt-1.1
    gwt-windows-1.6.4

    Reading other developer's suggestions I have used setBaseStyle("tallCell")

    Code:
            grid.setWrapCells(true);  
            grid.setFixedRecordHeights(false); 	
            grid.setBaseStyle("tallCell");
            grid.setAlternateRecordStyles(false);  
            grid.setShowAllRecords(false);
            grid.setShowRollOver(false);
            grid.setSelectionType(SelectionStyle.SIMPLE);  
            grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
    I even tried live grid sample and it says: "Can't select that many records at once. Please try working in smaller batches".

    Is there a bug with ListGrid check box implementation on IE ? or is it a default behavior.

    Any help in improving performance would be appreciated.

    Thanks

    #2
    With about 50 columns we were able to reproduce 3-5 second delays. This is now fixed in SmartClient and will appear in SmartGWT SVN shortly.

    Underlying problem is that IE is very, very slow to refresh individual cells in large grids, so a full redraw of the grid is better.
    Last edited by Isomorphic; 26 May 2009, 14:23.

    Comment


      #3
      Originally posted by Isomorphic
      With about 50 columns we were able to reproduce 3-5 delays. This is now fixed in SmartClient and will appear in SmartGWT SVN shortly.

      Underlying problem is that IE is very, very slow to refresh individual cells in large grids, so a full redraw of the grid is better.
      What is 3-5 delays ?

      Current behaviour of ListGrid is on (de)select of a checkbox on a row/header highlight's the entire row/all rows. Is there a way to turn off highlighting of the row upon (de)select of a checkbox. Doing that will not require to refresh individual cells in large grids nor would require full redraw of the grid. Except the column which holds the checkboxes.

      Also, can you please let me know when it will be available in SmartGWT SVN.

      Comment


        #4
        3-5 second delays, sorry.

        You can make the cellSelected* CSS styles the same as the non-selected versions to disable styling from a cosmetic perspective. From a performance perspective, it is faster to refresh the entire grid in IE than to refresh even, say, 3 cells.

        Comment


          #5
          Change is in SVN.

          Comment


            #6
            Originally posted by sjivan
            Change is in SVN.
            http://code.google.com/p/smartgwt/source/browse/#svn

            I do not see the revision, which trunk/rev do I need to checkout ?

            -------------------------------------------------------------------

            r554 fixes to DateChooser.setData Today (11 hours ago) sanjiv.jivan
            r553 polishing Today (11 hours ago) sanjiv.jivan
            r552 fixes to Canvas.setVisible(..) Yesterday (26 hours ago) charles.kendrick
            r551 support tree nodes data being ListGridRecord's Yesterday (26 hours ago) charles.kendrick
            r550 fixes to RPCManager.setXXXPrompt(..). Yesterday (29 hours ago) charles.kendrick
            r549 changed min, max to type Integer in LengthRangeValidator Yesterday (29 hours ago) charles.kendrick
            r548 typo May 25 (2 days ago) sanjiv.jivan
            r547 API updates, added FilterBuilder "search" event handler. May 21 (5 days ago) sanjiv.jivan

            Comment


              #7
              The change was to the sc jars located here : http://code.google.com/p/smartgwt/so...b/sc/7.0-trunk

              The Google SVN changes log does not include them.

              As indicated in the Building from SVN instructions, you need to update the "tools" folder too.

              Comment


                #8
                Originally posted by p3rana
                http://code.google.com/p/smartgwt/source/browse/#svn

                I do not see the revision, which trunk/rev do I need to checkout ?

                -------------------------------------------------------------------

                r554 fixes to DateChooser.setData Today (11 hours ago) sanjiv.jivan
                r553 polishing Today (11 hours ago) sanjiv.jivan
                r552 fixes to Canvas.setVisible(..) Yesterday (26 hours ago) charles.kendrick
                r551 support tree nodes data being ListGridRecord's Yesterday (26 hours ago) charles.kendrick
                r550 fixes to RPCManager.setXXXPrompt(..). Yesterday (29 hours ago) charles.kendrick
                r549 changed min, max to type Integer in LengthRangeValidator Yesterday (29 hours ago) charles.kendrick
                r548 typo May 25 (2 days ago) sanjiv.jivan
                r547 API updates, added FilterBuilder "search" event handler. May 21 (5 days ago) sanjiv.jivan
                oops, my bad. I actually overlooked checking in the updated files. I've checked them in now. Please update and try against SVN.

                Sanjiv

                Comment


                  #9
                  Originally posted by Isomorphic
                  3-5 second delays, sorry.

                  You can make the cellSelected* CSS styles the same as the non-selected versions to disable styling from a cosmetic perspective. From a performance perspective, it is faster to refresh the entire grid in IE than to refresh even, say, 3 cells.

                  I do not know the inner working of ListGrid. However I would say this:

                  From cosmetic perspective: It would be more useful to provide a method to turn off highlighting of the row upon (de)select of a checkbox.

                  From Performance perspective: I do not agree with what you are saying. You do have access to table DOM as well as checkbox DOM objects in the ListGrid. When you click on header checkbox, you just need to iterate thru each row and set getElementById("checkboxid").checked=true/false. You do not need to refresh the entire grid / 3 cells, browser would take care of the refresh.

                  Again, I do not know how ListGrid works, but this could improve the performance of checkbox (de)selection on IE dramatically

                  Comment


                    #10
                    Hi p3rana,

                    This has nothing to do with how the ListGrid works, but with IE. Changes to cells in IE (interior content or styles) take time proportional to the number of cells in the table, even if IE should be able to determine that there's no possibility that the change could affect other cells. For this reason, refreshing even a small number of cells (or content within cells) is worse than redrawing the grid, which is in fact very well optimized.

                    Comment


                      #11
                      Originally posted by sjivan
                      oops, my bad. I actually overlooked checking in the updated files. I've checked them in now. Please update and try against SVN.

                      Sanjiv
                      Thanks Sanjiv, I downloaded and recompiled smartgwt.jar, the (de)select all on IE for 100 rows x 40 columns is now happening in 4-5 seconds delay rather than 30+ seconds.

                      However there is another issue with ListGrid:

                      Step 1. Freeze a column
                      Step 2. Click on header checkbox to (de)select all or
                      Click on check box on any row

                      It throws a javascript error

                      Line: 735
                      Char: 172
                      Error: $67j is null or not an object
                      Code: 0

                      Comment


                        #12
                        That JS error was a recent regression in SmartClient that is now fixed. Should hit SmartGWT SVN in a few days.

                        Comment


                          #13
                          Updated in SVN.

                          Comment

                          Working...
                          X