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

GridDataLoader - Paging - lot of time refreshing, memory wasted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 7.0.0, 7.0.1, 7.0.2, 7.0.3
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      no problems without PAGING
      problems only with PAGING, refresh and many records (> 50.000)

      Description

      "#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); }

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: