[jdom-interest] Ampersand question

Alex Chaffee guru at edamame.stinky.com
Thu Jul 13 03:17:15 PDT 2000

> 	  Also, we are throwing around a combination of strings and JDOM 
> documents.  [...]

Your need is clear, and very compelling.  One important point I'd like
to emphasize:

Strings are SLOW.

Moreover, they fill up the heap like crazy.  The architecture you
described will probably be very clean and straightforward to write,
and perform very poorly.

You might be better advised to use streams and buffers rather than
generating a new String for every document.

Likewise, when reading a blob from the DB, you get it as a stream; why
bother going through the extra step of converting it into a string,
then parsing the string, when you can just parse it directly as a
stream?  Same goes for writing to the DB.

 - Alex

Alex Chaffee                       mailto:alex at jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

More information about the jdom-interest mailing list