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

        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.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: