On 01/21/2010 10:21 PM, Scott Marlow wrote:
>
> Please also resist the urge to shift off of EE 6 work in order to scour
> all our code for logging cleanups. :)
>
If you happen to notice any loggers that are created as instance
variables, please consider changing them to class (static) variables.
You can check in these changes against JBAS-7291. The last time I
looked (early last fall), 6MB of memory was used by 109,552 instances of
org.jboss.logging.Logger.
This problem should be largely mitigated at this stage. First, Ales fixed
a bunch of these in MC. Second, jboss-logging 2.2 and on automatically
share logger instances, so 100,000 references to the same category == one
object (but still an awful lot of redundant references).
However on a typical 64-bit system, 100k instances still == 800k RAM
consumed, so yeah it's still wasteful. Just not as.
- DML