ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-550

New View Root State Manager to improve cpu & memory consumption

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EE-4.2.0.GA
    • Component/s: Core Extensions
    • Labels:
      None
    • Environment:
      all

      Description

      Implement custom state manager to improve cpu & memory consumption. The state manager will avoid serialize and deserialize the state of the component tree. This will also reduce component creation and disposal.
      1. standardviewrendering.png
        284 kB
      2. standardmemoryusage.png
        310 kB
      3. partialstatesaving.png
        26 kB
      4. customviewrendering.png
        260 kB
      5. customstatesaving.png
        43 kB
      6. custommemoryusage.png
        184 kB

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment - - edited

          Added new state manager implementation that does not de/serialize the component tree to restore/save the state of the view. Instead it keeps the UIViewRoot as the representation of the view. Restoring the view state is as simple as replacing the current UIViewRoot object.

          Introduced to new context parameters:

          • com.icesoft.viewRootStateManager
            Parameter used to enable the custom state manager. The default value is false.
          • com.icesoft.viewRootStateManager.maxViews
            Sets maximum number of views allowed to exist for a given session when custom state manager is enabled. Default value is 15.
          Show
          Mircea Toma added a comment - - edited Added new state manager implementation that does not de/serialize the component tree to restore/save the state of the view. Instead it keeps the UIViewRoot as the representation of the view. Restoring the view state is as simple as replacing the current UIViewRoot object. Introduced to new context parameters: com.icesoft.viewRootStateManager Parameter used to enable the custom state manager. The default value is false. com.icesoft.viewRootStateManager.maxViews Sets maximum number of views allowed to exist for a given session when custom state manager is enabled. Default value is 15.
          Hide
          Mircea Toma added a comment - - edited

          After running the CPU and memory profiling the custom state manager proves to be more CPU perfomant but it uses more memory than the default partial state management.

          Here is how much time the state managers spend on saving/restoring the state. The default state manager spends approximately 50000 ms to save/restore state for 55 requests. The custom state manager is spending just 191 ms. So the state saving& restoring performance is increased 26 times.

          default state manager

          custom state manager

          The following profiling results show how much time state management is spending relative to page rendering. The default state manager spends 27.3% restoring the state while the custom state manager spends ~0%.

          default state manager

          custom state manager

          Memory wise the custom state manager does not do so well since the entire component tree is kept in the session, not its serialized form. The custom state manager uses ~40MB per session while the default (delta) state manager uses just ~17MB per session.

          default state manager

          custom state manager

          Show
          Mircea Toma added a comment - - edited After running the CPU and memory profiling the custom state manager proves to be more CPU perfomant but it uses more memory than the default partial state management. Here is how much time the state managers spend on saving/restoring the state. The default state manager spends approximately 50000 ms to save/restore state for 55 requests. The custom state manager is spending just 191 ms . So the state saving& restoring performance is increased 26 times. default state manager custom state manager The following profiling results show how much time state management is spending relative to page rendering. The default state manager spends 27.3% restoring the state while the custom state manager spends ~0% . default state manager custom state manager Memory wise the custom state manager does not do so well since the entire component tree is kept in the session, not its serialized form. The custom state manager uses ~40MB per session while the default (delta) state manager uses just ~17MB per session. default state manager custom state manager
          Hide
          Mircea Toma added a comment -

          Added Wiki documentation.

          Show
          Mircea Toma added a comment - Added Wiki documentation.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: