Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] serializing XOM objects

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Luca Passani <passani AT eunet.no>
  • To: xom-interest <xom-interest AT lists.ibiblio.org>
  • Cc: Elliotte Harold <elharo AT metalab.unc.edu>
  • Subject: Re: [XOM-interest] serializing XOM objects
  • Date: Tue, 31 May 2005 15:04:17 +0200

Elliotte Harold wrote:


What proof do you have that you're wasting CPU cycles? I'd surmise the opposite. java's object serialization is notoriously inefficient. XML routinely outperforms it.

but this is extremely easy to prove, in this case. In fact I can match whatever low use of CPU you can prove against my ZERO!

To recap:

- upon restarting, tomcat (and other app servers, I would imagine) freezes user session info for later. This implies
that Java objects are serialized. This just happens and it's outside of developer control as far as I understand.
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Session-Tracking.html

- my application (a servlet) builds the DOM for a big XML file and generates a bunch of XML bushes as by-products.
I typically only need one of them, but I may need more if I receive more requests from the same user. Storing those bushes
in the session is a marriage made in heaven. They'll be discarded naturally when the user session times out, while
still available should the user request them.

- this costs zero to me. Your solution would imply to *always* create XML which I won't need in approx 70% of the cases.

to me, this is the proof you were requesting, father Elliotte

Luca





Archive powered by MHonArc 2.6.24.

Top of Page