Leonardo Uribe created MYFACES-3568:
---------------------------------------

             Summary: [perf] use viewId hashCode() instead full viewId on 
server side state saving SerializedViewKey
                 Key: MYFACES-3568
                 URL: https://issues.apache.org/jira/browse/MYFACES-3568
             Project: MyFaces Core
          Issue Type: Sub-task
          Components: JSR-314
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to