ICEfaces
  1. ICEfaces
  2. ICE-9490

Move DOM cloning from onElementUpdate to subtree rendering feature

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEfaces
    • Assignee Priority:
      P2

      Description

      onElementUpdate feature needs an clean old DOM when it tries to find the elements that have to have their callbacks invoked. To have a clean old DOM we currently clone the entire DOM since later on the original old DOM modified by the subtree rendering process.

      Instead, we could clone just the yet to be modified DOM trees and have the subtree rendering process work with them. The onElementUpdate feature will be free to use the old DOM as it is (unmodified). Hopefully this can save some memory and processing time since we need to clone fewer elements.

        Activity

        Mircea Toma created issue -
        Mircea Toma made changes -
        Field Original Value New Value
        Assignee Mircea Toma [ mircea.toma ]
        Mircea Toma made changes -
        Fix Version/s 3.4 [ 10770 ]
        Mircea Toma made changes -
        Affects Version/s 3.3 [ 10370 ]
        Mircea Toma made changes -
        Assignee Priority P2 [ 10011 ]
        Hide
        Mircea Toma added a comment -

        What is the reason for clearing the old DOM fragment corresponding to the rendered component subtree? Why not just pass into the diff process a new document as the new DOM fragment and use the unmodified old DOM to lookup the old DOM fragment?

        Show
        Mircea Toma added a comment - What is the reason for clearing the old DOM fragment corresponding to the rendered component subtree? Why not just pass into the diff process a new document as the new DOM fragment and use the unmodified old DOM to lookup the old DOM fragment?
        Hide
        Mircea Toma added a comment - - edited

        Modified DOMPartialViewContext to capture all the subtree modification of the document and then apply them at the end of the process to the old document. The result is a proper new document that can be used for the next partial render cycle.
        The change also got rid of the document cloning, now only the new subtrees need to be imported into the old document and have Element.setIdAttribute invoked on the ID-ed elements.

        Show
        Mircea Toma added a comment - - edited Modified DOMPartialViewContext to capture all the subtree modification of the document and then apply them at the end of the process to the old document. The result is a proper new document that can be used for the next partial render cycle. The change also got rid of the document cloning, now only the new subtrees need to be imported into the old document and have Element.setIdAttribute invoked on the ID-ed elements.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37337 Thu Aug 08 11:48:02 MDT 2013 mircea.toma ICE-9490 Modified DOMPartialViewContext to capture all the subtree modification of the document and then apply them at the end of the process to the old document. The result is a proper new document that can be used for the next partial render cycle.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37339 Thu Aug 08 12:06:15 MDT 2013 mircea.toma ICE-9490 Create document element in the new document that is used for rendering the subtree into, just in case the root component writes multiple root nodes.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P02 [ 11371 ]
        Hide
        Mircea Toma added a comment -

        Back-ported fixes.

        Show
        Mircea Toma added a comment - Back-ported fixes.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: