ICEfaces
  1. ICEfaces
  2. ICE-4002

Update coalescing does not preserve the order of updates

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2 SP1, 1.8DR#2
    • Fix Version/s: 1.7.2-SP2, 1.8RC1, 1.8
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      server

      Description

      After update coalescing is executed the elements are put into a HashSet which doesn't necessarily preserves the order in which updates were created.

        Activity

        Mircea Toma created issue -
        Mircea Toma made changes -
        Field Original Value New Value
        Salesforce Case [50070000007Bagr]
        Fix Version/s 1.8DR#3 [ 10143 ]
        Assignee Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18236 Tue Jan 27 16:32:58 MST 2009 mircea.toma ICE-4002 Preserve the order of creation for updates.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/command/UpdateElements.java
        Hide
        Mircea Toma added a comment -

        Preserve the order of creation for updates.

        Show
        Mircea Toma added a comment - Preserve the order of creation for updates.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        User Ansel1 added a comment -

        Couldn't this be more efficient by elimination old updates to children of newer updates? Say node B is a child of node A:

        A
        \
        B

        Currently, the coalesce function would do:

        coal(prev[B], new[A]) = [B, A];

        But since A already includes updates to B, the older B update is not necessary. You could just do:

        coal(prev[B], new[A]) = [A]; because isPrevChildOfCurrent(B, A) == true

        I would think this additional search would be more efficient than applying extra, unneeded DOM updates in the browser.

        Show
        User Ansel1 added a comment - Couldn't this be more efficient by elimination old updates to children of newer updates? Say node B is a child of node A: A \ B Currently, the coalesce function would do: coal(prev [B] , new [A] ) = [B, A] ; But since A already includes updates to B, the older B update is not necessary. You could just do: coal(prev [B] , new [A] ) = [A] ; because isPrevChildOfCurrent(B, A) == true I would think this additional search would be more efficient than applying extra, unneeded DOM updates in the browser.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18243 Wed Jan 28 14:51:36 MST 2009 mircea.toma ICE-4002 Preserve the order of creation for updates.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/webapp/command/UpdateElements.java
        Hide
        Mircea Toma added a comment -

        Yes, you are right. I thought about implementing the algorithm you mention above. There were a few things that stopped from doing it that way:

        a) It can potentially introduce a lot of DOM traversals when coalescing over a larger set of elements.
        b) Occurrences of having newer element updates that include older element updates is quite small.
        c) Code becomes more complex thus more difficult to maintain.
        d) The added increased traffic due to older included updates is relatively small.

        Show
        Mircea Toma added a comment - Yes, you are right. I thought about implementing the algorithm you mention above. There were a few things that stopped from doing it that way: a) It can potentially introduce a lot of DOM traversals when coalescing over a larger set of elements. b) Occurrences of having newer element updates that include older element updates is quite small. c) Code becomes more complex thus more difficult to maintain. d) The added increased traffic due to older included updates is relatively small.
        Ken Fyten made changes -
        Fix Version/s 1.7.3 [ 10162 ]
        Ken Fyten made changes -
        Fix Version/s 1.8 [ 10161 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Mircea Toma [ mircea.toma ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: