Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1779

Duplicate Attributes require too much memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.13-core , 2.0.0-core
    • Components
    • None
    • Generic

    Description

      When saving a request, trinidad is creating an attribute named org.apache.myfaces.trinidadinternal.application.VIEW_CACHE.<id> which references a page state (org.apache.myfaces.trinidadinternal.application.StateManagerImpl$PageState) and also creates an attribute named org.apache.myfaces.trinidadinternal.application.StateManagerImp.ACTIVE_PAGE_STATE which references the same page state object.

      On single VM instances, this isn't an issue as the referenced object will be the same. But on distributed systems, depending on the replication mechanism used, this can lead to two copies of that page state object. [Consider the case of an appserver that saves the HTTP session to a database, which will lose all object reference information.]

      As the page state object is quite large (I typically see its serialized state require 150000 bytes), duplicating that memory requirement has an enormous impact on the performance of distributed systems. Additionally, it is then possible that after a replication that doesn't preserve the object references, the behavior of the application might be affected.

      From Max Starets:
      Perhaps the ACTIVE_PAGE_STATE could be referring to the state token (id) instead.

      Attachments

        1. JIRA_1779_MAIN2.patch
          1 kB
          Blake Sullivan
        2. JIRA-1779.patch
          5 kB
          Blake Sullivan
        3. trin_1779_1_2_12_3_part2.patch
          4 kB
          Blake Sullivan
        4. TRIN_1779_1_2_12_3.patch
          3 kB
          Blake Sullivan
        5. TRIN_1779_12x.patch
          2 kB
          Blake Sullivan
        6. trin1779_12x_part2.patch
          4 kB
          Blake Sullivan

        Issue Links

          Activity

            People

              btsulliv Blake Sullivan
              soaks Scott Oaks
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: