logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: LocationInfo performance, StackTraceElement
Date Wed, 08 Sep 2004 20:10:22 GMT

Hello Martin,

At 03:40 AM 5/18/2004, Martin Schulz wrote:
>For example:
>
>jakarta-log4j-1.2.8/src/java/org/apache/log4j/performance/xml/logging13.xml 
>100000
>
>gives me 82 us vs 183 us before. (AMD Athlon 1600 at 1.3GHz, JDK 1.4.2_04 
>on Win XP)
>I supposed that's the pure speedup ignoring any real effort to write the 
>log to file.
>
>For the same run, JProfiler gives me 4.1 MB (35.6% ) allocates in 
>LocationInfo.<init>
>vs. 179MB (92.2%) before.  In either case 2.5 MB of that go on the account 
>of Throwable.<init>.

I have a hard time reproducing these figures using Jprofiler. In all
the various Memory Views, the numbers shown are associated with a
given time slice. The views do not show allocations cumulatively over
all periods. Were you using cumulative numbers in your tests?

I also do not understand why the StackTraceElement method is so much
more efficient with respect to memory allocation. At this stage, all I
can tell is that the Throwable.printStackTrace method seems to be memory
intensive. Moreover, this method is absent when extracting location
info using JDK 1.4 StackTraceElement objects.

Your comments on the matter would be highly appreciated.


-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message