DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=23924>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=23924

Enhanced performance for TagUtils.filter()





------- Additional Comments From [EMAIL PROTECTED]  2004-07-24 10:40 -------
I think the third object I was referring to was the char[] inside the 
StringBuffer -- or else the additional String that is created in the return 
statement, which is avoidable in cases where nothing is escaped.

While the current code's allocation of a char[] seems unnecessary it might 
increase performance. The code dereferences an array instead of calling charAt
(). That is probably faster (though it consumes more memory) even in the 
presence of HotSpot, I'd imagine. I'd let it stand, as it is probably on 
purpose.

Obviously I'd still like to see the original patch applied; the overall 
performance/memory increase is not insignificant, and it adds only a little 
complexity to a method that should not need to change. I've also supplied unit 
tests to verify any further changes. It just seems like an easy win.

If you aren't convinced, no problem, you are welcome to close this one without 
changes.

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

Reply via email to