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

Performance issue when ROD adds listcells to body

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.6.1
    • Fix Version/s: 8.6.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S1, ZK 8.6.2 S2

      Description

      Steps to Reproduce

      run fiddle
      http://zkfiddle.org/sample/2mete3i/2-Dynamic-Listbox-Columns-Performance#source-2

      scroll down to trigger load on demand

      Current Result

      Load on demand trigger a large number of zUtl fireSized, which cause as many computation of isRealVisible which takes a lot of rendering time.
      average rendering time after receiving the response for a batch or ROD entries is around 10s

      Expected Result

      rendering a batch of ROD entries should only be a few seconds.
      rendering shouldn't call fireSized for each individual elements (one fireSized at the end should be triggered anyway by Listbox)

      Debug Info

      fireSized triggered by
      fireSized (rod.zul:1119)
      jq.fn.(anonymous function) (zk.wpd:formatted:12164)
      _asBodyChild (zk.wpd:formatted:26211)
      mtAU (zk.wpd:formatted:25028)
      zkx (zk.wpd:formatted:25249)
      zkx_ (zk.wpd:formatted:25267)
      addChd (zk.wpd:formatted:27844)
      doProcess (zk.wpd:formatted:26051)
      doCmdsNow (zk.wpd:formatted:26161)
      _doCmds (zk.wpd:formatted:26541)
      afterResponse (zk.wpd:formatted:27097)
      _onResponseReady (zk.wpd:formatted:26944)
      XMLHttpRequest.send (async)
      ajaxSendNow (zk.wpd:formatted:26128)
      sendNow (zk.wpd:formatted:26799)
      (anonymous) (zk.wpd:formatted:26097)
      setTimeout (async)
      ajaxSend2 (zk.wpd:formatted:26096)
      ajaxSend (zk.wpd:formatted:26089)
      send (zk.wpd:formatted:26427)
      sendAU_ (zk.wpd:formatted:21969)
      fireX (zk.wpd:formatted:21907)
      fire (zk.wpd:formatted:22007)
      _scrollPage (zk.wpd:formatted:43585)
      (anonymous) (zk.wpd:formatted:11062)
      setTimeout (async)
      _fireOnScrollPos (zk.wpd:formatted:43435)
      _doScroll (zul.mesh.wpd:1013)
      $supers (zk.wpd:formatted:11219)
      $super (zk.wpd:formatted:11164)
      _doScroll (zul.sel.wpd:1810)
      (anonymous) (zk.wpd:formatted:18039)
      dispatch (zk.wpd:formatted:4912)
      elemData.handle (zk.wpd:formatted:4609)

      Root Cause

      Workaround

      prevent element firesized when added at DOM root during rendering.
      WARNING: not fully tested, may prevent automatic resizing of root-level elements such as popups / modal windows

       	<script><![CDATA[
      	zk.afterLoad('zk', function() {
      		var xzUtl = {};
      		zk.skipFireSized = false;
      		zk.override(zUtl, xzUtl ,{
      			fireSized : function(a,b) {
      				var result;	
      				if(!(!(a.className == "zk.Page" ) && (a.$n().parentElement == document.body))){
      					result = xzUtl.fireSized.apply(this, arguments);
      				}
      				return result;
      			}
      		});//zk.override
      	});//zk.afterLoad
      	]]></script> 
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                DevChu DevChu
                Reporter:
                MDuchemin MDuchemin
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: