logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Womack <mwom...@bevocal.com>
Subject RE: Serialization performance
Date Tue, 26 Mar 2002 18:50:46 GMT

Thanks for the explanation.  I was reading through the javadoc for
Serializable and Externalizable, and while it never came right out and said
it, I got the basic undertone of your explanation.

Since log4j can own both sides of the pipe, anything that can speed the
transfer sounds like a win.

My question is, are the changes to use Externalizable compatible with older
log4j versions?  If I had a log4j version using the new code sending logging
events to an older version of log4j, would they be able to talk?  If not,
could the new code be written so it would work with older versions?  I'm
guessing not, but maybe?

Still, requiring the same version of log4j on both sides might be an
acceptable requirement.


-----Original Message-----
From: Leathers, Burton [mailto:Burton.Leathers@Cognos.COM]
Sent: Tuesday, March 26, 2002 10:23 AM
To: 'Log4J Developers List'
Subject: RE: Serialization performance

Mark, et al.

The spec for both serialization and externalization can be downloaded from

The nub of it is that serialization is built in and carries a great deal of
meta data whereas externalization is "roll your own" which means that much
content can be omitted provided(!!) the sender and receiver have a prior
agreement on the content of the structured object.

Serialization is designed to handle inheritance and evolution with as much
grace as possible. Externalization makes no such commitments -- but one can
build them in to whatever degree is appropriate.

A properly implemented externalization technique can be designed to go like
stink because so much less is encoded and transmitted but it falls upon the
developer of the externalization methods to make it deal with changes in
class structures.


-----Original Message-----
From: Mark Womack [mailto:mwomack@bevocal.com]
Sent: Tuesday, March 26, 2002 12:33 PM
To: 'Log4J Developers List'
Subject: RE: Serialization performance

Ole, what is the difference between Externalizable and Serializable?  Can
you give some background as to why there is a performance increase?


-----Original Message-----
From: Ole Dalgaard [mailto:josua+log4j@giraffen.dk]
Sent: Tuesday, March 26, 2002 1:20 AM
To: log4j-dev@jakarta.apache.org
Subject: Serialization performance


I was performance testing the SocketAppender and found it too slow and
CPU intensive.So I made some changes to LoggingEvent.
LoggingEvent is now Externalizable instead of Serializable. This should
be compatible with JDK 1.1 as well.
My performance measurements give me 30-50% more throughput.

Ole Dalgaard

To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

View raw message