TempClassLoader buffer reuse reduces memory requirements
--------------------------------------------------------
Key: OPENEJB-1265
URL: https://issues.apache.org/jira/browse/OPENEJB-1265
Project: OpenEJB
Issue Type: Improvement
Components: server
Affects Versions: 3.1.x
Environment: All
Reporter: Andy Gumbrecht
Priority: Trivial
Attachments: TempClassLoader.patch
The current TempClassLoader potentially uses a new 8k ByteArrayOutputStream per
class that it inspects.
Whilst hunting for a possible ClassLoader issue I found that replacing the
ByteArrayOutputStream with a reusable one leads to a substantial reduction in
memory during server start up.
I am unable to quantify what 'substantial' means in real terms as I have not
run any real benchmarking, but it is fair to say that I had noticed heap sizes
growing to over 180m during a server start compared to the 90m that I have now.
These values would be application specific, but it would be nice to see if this
is an improvement for others.
I have also synchronized a few access methods to ensure that resources are
protected during the inspection process.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.