Mark, et al.

The spec for both serialization and externalization can be downloaded from
http://java.sun.com/j2se/1.4/docs/guide/serialization/index.html

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.

Burton

-----Original Message-----
From: Mark Womack [mailto:[EMAIL PROTECTED]]
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?

Thanks,
-Mark

-----Original Message-----
From: Ole Dalgaard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 1:20 AM
To: [EMAIL PROTECTED]
Subject: Serialization performance


Hi,

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.

BR
Ole Dalgaard


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to