Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
The Latest Development Code, 2.7.1
-
None
-
None
Description
XMLReaderManager has a scheme where each thread holds its own XMLReader for re-use across subsequent transformations.
For example each thread used to run a servlet would cache and re-use the rather large heavy weight XMLReader for re-use.
The problem is that this may lead to memory exhaustion in the name of performance. This is not a memory leak that gets larger with time, but rather that too many XMLReader-s may be cached and cause memory exhaustion.
Since we have moved beyond JRE 1.1.8 we can now use newer memory services, for example we can hold the references to XMLReader-s with weak references that can be garbage collected when memory runs low.