i think it is good idea however in what places did you find to
XMLString.toString()
is used os excessively?
making string field public is not good idea as it can
lead to strange bugs if user get or set this field ...
i would change it to:
private String string;
maybe also better name than "string " could be used like cached String?
thanks,
alek
Daniel Butterfield wrote:
--Hi all,
I'm currently working on a large project that uses the dom tree heavily. We noticed in our vm profiles that a large portion of our memory consumtion was as a result of .toString() <<XMLString.java>> As a result, I've modified the XMLString class to store a reference to the string once the toString() method is called on that object. My question is, is this the correct way to address the problem of excessive String being created from this method, and do you see anything wrong with this approach? (Attached is a copy of the code changes I madeSince this change went in, we have noticed a significant decrease in memory consumtion due to String creation from this method.
Dan
[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--- Memorable Quote from Firefly (105. Out Of Gas)
-Ship like this, be with you until you die -That's because it's a deathtrap
