Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2.12-core
-
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);