-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
None
ZipFile maintains a pool of Inflater objects. Inflaters are released back to the pool when the input stream is explicitly closed, when the input stream instance is no longer strongly reachable, or when the ZipFile is closed.
In use cases such as class loaders, a ZipFile may be kept open for the life time of the application. In such cases, if client code consumes input streams without closing them (explicitly or via TwR), then a large number of Inflater issues may be created before GC starts returning them to the pool.
To reduce the number of pooled Inflater instances that are kept alive, it would be benefitial if ZipFileInflaterInputStream would release the Inflater when it observes an EOF (the client has fully consumed the stream).
In use cases such as class loaders, a ZipFile may be kept open for the life time of the application. In such cases, if client code consumes input streams without closing them (explicitly or via TwR), then a large number of Inflater issues may be created before GC starts returning them to the pool.
To reduce the number of pooled Inflater instances that are kept alive, it would be benefitial if ZipFileInflaterInputStream would release the Inflater when it observes an EOF (the client has fully consumed the stream).
- links to
-
Review(master) openjdk/jdk/21157