DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=943>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=943 Support for string-interning feature needed [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX ------- Additional Comments From [EMAIL PROTECTED] 2001-10-31 09:50 ------- >From the performance point of view, newstring.intern() is not always a good choice. We would need to call this method very often (remember everything an xml parser deals with is a string). But the method is synchronized, which means we have to pay the price for each string. Both Xerces-1 and Xerces-2 have internal string-interning strategy. X1 uses StringPool, which uses integers to identify string, and is not easy to be exposed to the applications. While X2 use SymbolTable, which is similar to String#intern(). But it doesn't have the synchronization overhead in most cases. It's possible for the applications to use X2 string-interning strategy: create your own SymbolTable and assign it to the parser. Some strings (attribute/element names, for example) you get from X2 are added into the symbol table you provided, so to compare two strings: if (strFromX2 == mySymbolTable.addSymbol(strToCompare)) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
