Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2482

GridDataLoader - Paging - lot of time refreshing, memory wasted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 7.0.0, 7.0.1, 7.0.2, 7.0.3
    • None
    • no problems without PAGING
      problems only with PAGING, refresh and many records (> 50.000)

      "#syncModel(..)" METHOD manages the "#model.getSize()" to know how many rows should be appended as CHILD in the GRID

      If the GRID is PAGING "#inPaging", show/refreshing data SHOULD not affect "#model.getSize()", but only UPTO the PAGING SIZE:
      actually the var "#newsz", "#oldsz" works on the ENTIRE "#model.getSize()", doing MORE WORK then necessary

      If the PAGE size is 20 and the "#model.getSize()" is 50.000 the a refresh will cause a LOT of work (up to one minute):
      it'a a BUG... it appends 50.000 children to the GRID instead of 20 (the PAGE SIZE):
      if the model.getSize() is 5milion, it no more works...

      at "#while (--cnt >= 0) {" it loops to REMOVE extra GRID record children:
      it's usefull because maybe the GRID before WAS NOT PAGING

      // BUG FIX START
      // for (; --newcnt >= 0; ++min) {
      //
      // if the GRID is PAGING it should work on PAGE size ROWS and not all the rows in the model

      int pageLimit = newcnt;
      if( inPaging )

      { pageLimit = pageLimit > _grid.getPageSize() ? _grid.getPageSize() : pageLimit; }

      for (; --pageLimit >= 0; ++min )

      { // BUG FIX END if (renderer == null) renderer = (RowRenderer) getRealRenderer(); rows.insertBefore(newUnloadedItem(renderer, min), next); }

            Unassigned Unassigned
            naarani naarani
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: