[Home] [By Thread] [By Date] [Recent Entries]
At 12:02 PM 12/21/1999 +0000, Miles Sabin wrote: >This is one of the big problems with intern'ing IMO. The cost >of intern'ing those args (either done externally by the client >app, or internally by a library) wipes out the potential >benfits. If you can intern a name once and repeatedly use a ref to that intern, you do gain benefits. SAX itself might suffer a hit doing all the interning, but it saves the app from taking a hit doing all the string compares, assuming the app can repeatedly do string compares using the same intern ref of its own naming. Whether savings are realized depends on the application. I'm just questioning the use of intern in document APIs. We use a special name object instead and force the app to select the appropriate name object to hand to the API. By using String args you aren't forcing the app to use only interned objects, so you set yourself up for having to deal with both interned and non-interned Strings. This leaves you with a large performance hit to discover that a requested name is not there. Your paragraph would be more accurate to me if it said that the cost of interning potentially wipes out its benefits. -- Joe Lapp (Looking for some good people to help design Principal Architect and build the Internet's business-to-business webMethods, Inc. XML infrastructure. We are 100% Java.) jlapp@w... http://www.webMethods.com xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To unsubscribe, mailto:majordomo@i... the following message; unsubscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|

Cart



