ICEfaces
  1. ICEfaces
  2. ICE-8763

Performance bottleneck while cleaning up event handlers

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: EE-3.2.0.BETA, EE-3.2.0.GA, 3.3
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      IE8

      Description


      Just before the DOM updates are applied the bridge tries to cleanup the event handlers of all the elements that will be gone once update is applied. The cleanup can take a significant amount of time (> 10 seconds) when the updates have a large number of elements.

        Activity

        Hide
        Mircea Toma added a comment - - edited

        Changed the cleanup of event handlers before the update is applied to run only over forms elements, anchors, iframes and forms since these are the types that usually have callbacks attached.

        Show
        Mircea Toma added a comment - - edited Changed the cleanup of event handlers before the update is applied to run only over forms elements, anchors, iframes and forms since these are the types that usually have callbacks attached.
        Hide
        Ted Goddard added a comment - - edited

        Mistakenly committed this under ICE-8673:
        svn commit . -m "use low-level string manipulation and stored ancestor list to optimize findAndNotifyUpdatedElements (ICE-8673)"
        Sending core/src/main/javascript/application.js
        Transmitting file data .
        Committed revision 32158.
        The optimization was to store the list of ancestor IDs as a string for each element expecting an onUpdate callback. This avoids iterating over the DOM inside the listener check loop. Updates for javax.faces.ViewState and *_fixviewstate are ignored.

        Show
        Ted Goddard added a comment - - edited Mistakenly committed this under ICE-8673 : svn commit . -m "use low-level string manipulation and stored ancestor list to optimize findAndNotifyUpdatedElements ( ICE-8673 )" Sending core/src/main/javascript/application.js Transmitting file data . Committed revision 32158. The optimization was to store the list of ancestor IDs as a string for each element expecting an onUpdate callback. This avoids iterating over the DOM inside the listener check loop. Updates for javax.faces.ViewState and *_fixviewstate are ignored.
        Hide
        Mircea Toma added a comment -

        Modified findAndNotifyUpdatedElements function to use properties on object to define key-value pairs instead of using the Cell object defined in collections.js. This implementation change speeds up the execution since accessing properties on an object is much faster than using the single method dispatch mechanism used by the Cell object.

        Show
        Mircea Toma added a comment - Modified findAndNotifyUpdatedElements function to use properties on object to define key-value pairs instead of using the Cell object defined in collections.js. This implementation change speeds up the execution since accessing properties on an object is much faster than using the single method dispatch mechanism used by the Cell object.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: