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

        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.
        Hide
        Mircea Toma added a comment -

        Back-ported fixes.

        Show
        Mircea Toma added a comment - Back-ported fixes.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: