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

TrackerImplEx#removeAllReference accesses map value by iteration instead of key, lowers performance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 10.0.0
    • 10.0.0.FL, 9.6.4
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      Run sample "bugTreeDetachTime.zip"
      (put zul + classes in project and run)

      Click on "show data"
      wait for page to load
      Click on "clear tree"

      Current Result

      detaching all components is very long (>30s)

      Expected Result

      detaching component should be short, since we are just removing nodes.

      Debug Information

      During org.zkoss.zkmax.bind.impl.TrackerImplEx.removeAllReference(Set<TrackerNode>), the tracker node is removed from node LinkedHashMap using _sharableTrackerNodes.values().remove( ... MapEntryValue...);

      This is less performant than using _sharableTrackerNodes.remove( ... MapEntryKey... ), and cause delays in some applications.

      Workaround

      Attached override class for TrackerImplEx
      reduce processing time from ~30s to ~2s

            jumperchen jumperchen
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: