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. custommemoryusage.png
        184 kB
      2. customstatesaving.png
        43 kB
      3. customviewrendering.png
        260 kB
      4. partialstatesaving.png
        26 kB
      5. standardmemoryusage.png
        310 kB
      6. standardviewrendering.png
        284 kB

        Issue Links

          Activity

          Mircea Toma created issue -
          Mircea Toma made changes -
          Field Original Value New Value
          Link This issue blocks ICE-11113 [ ICE-11113 ]
          Mircea Toma made changes -
          Assignee Mircea Toma [ mircea.toma ]
          Mircea Toma made changes -
          Fix Version/s EE-4.2.0.GA [ 13071 ]
          Ken Fyten made changes -
          Project ICEfaces [ 10021 ] ICEfaces-EE [ 10040 ]
          Key ICE-11115 IPCK-550
          Issue Type Improvement [ 4 ] New Feature [ 2 ]
          Fix Version/s EE-4.2.0.GA [ 13075 ]
          Fix Version/s EE-4.2.0.GA [ 13071 ]
          Component/s Core Extensions [ 10051 ]
          Component/s Framework [ 10013 ]
          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.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49343 Thu Oct 06 09:20:53 MDT 2016 mircea.toma IPCK-550 Remove unused context parameters.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
          Mircea Toma made changes -
          Summary Profile state saving to potentially improve memory consumption Implement custom state manager to improve cpu & memory consumption
          Mircea Toma made changes -
          Description Profile state saving to potentially improve memory consumption and reduce component creation and disposal. 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.
          Mircea Toma made changes -
          Attachment custommemoryusage.tiff [ 22314 ]
          Attachment customstatesaving.tiff [ 22315 ]
          Attachment customviewrendering.tiff [ 22316 ]
          Attachment partialstatesaving.tiff [ 22317 ]
          Attachment standardmemoryusage.tiff [ 22318 ]
          Attachment standardviewrendering.tiff [ 22319 ]
          Mircea Toma made changes -
          Comment [ !standardviewrendering.tiff! ]
          Mircea Toma made changes -
          Attachment custommemoryusage.tiff [ 22314 ]
          Mircea Toma made changes -
          Attachment customstatesaving.tiff [ 22315 ]
          Mircea Toma made changes -
          Attachment customviewrendering.tiff [ 22316 ]
          Mircea Toma made changes -
          Attachment partialstatesaving.tiff [ 22317 ]
          Mircea Toma made changes -
          Attachment standardmemoryusage.tiff [ 22318 ]
          Mircea Toma made changes -
          Attachment standardviewrendering.tiff [ 22319 ]
          Mircea Toma made changes -
          Attachment custommemoryusage.png [ 22320 ]
          Attachment customstatesaving.png [ 22321 ]
          Attachment customviewrendering.png [ 22322 ]
          Attachment partialstatesaving.png [ 22323 ]
          Attachment standardmemoryusage.png [ 22324 ]
          Attachment standardviewrendering.png [ 22325 ]
          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.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Summary Implement custom state manager to improve cpu & memory consumption New View Root State Manager to improve cpu & memory consumption

            People

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

              Dates

              • Created:
                Updated:
                Resolved: