Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3563 Improvements in State Saving Algorithm
  3. MYFACES-3568

[perf] use viewId hashCode() instead full viewId on server side state saving SerializedViewKey

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.15, 2.1.9
    • JSR-314
    • None

    Description

      In SerializedViewKey, the current code uses a counter and the full viewId as key to retrieve or save the state into session.

      But store the full viewId is not really necessary. The counter itself gives uniqueness inside the session, and the viewId is just a way to check if the state to restore is the right one. In other words, given the probability of found two valid viewIds in an application with the same hashCode is astronomical and the fact that there is a counter that identify in an unique way a view state session token, it is reasonable to store into the state only the hashCode, and when the view is restored compare the viewId hashCode with the stored one into the state.

      This change will reduce the size required by SerializedViewKey.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: