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

Defltaer/inflater from StateManagerImpl holds onto memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.12-core
    • 2.0.0-beta-1
    • Archetype
    • None

    Description

      StateManagerImpl correctly uses a instance of Deflater/Infalter from session scope for view state compression to avoid recreating these objects since they have finalizers which hurt jvm. Howevere, when returning inflater/deflater to session scope method reset will just reset position for the internal buffer but will not clean buffer. This has impact on preformance since we can pin large buffers for the duration of the session. To avoid this issue we can declare
      private static final byte[] empty = new byte[0];

      and call decompressor.setInput(empty); and compressor.setInput(empty);

      Attachments

        Activity

          People

            Unassigned Unassigned
            smalesevic Stevan Malesevic
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: