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=35052>. 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=35052 ------- Additional Comments From [EMAIL PROTECTED] 2005-07-07 03:55 ------- So, this is the code for CategoryKey: class CategoryKey { String name; int hashCache; CategoryKey(String name) { this.name = name.intern(); hashCache = name.hashCode(); } final public int hashCode() { return hashCache; } final public boolean equals(Object rArg) { if(this == rArg) return true; if(rArg != null && CategoryKey.class == rArg.getClass()) return name == ((CategoryKey)rArg ).name; else return false; } } I think we are using the String.intern() call so that we can do the == between the two CategoryKey objects. Theoretically the String.intern() call will return the same String object for the same string value. I am assuming that using this instead of String.equals() is the speed increase. But I don't understand why this is really an issue. Only one version of the String should be added/created in the StringTable. Once a given logger has been created, no more entries to the StringTable should be added related to that logger. Are you creating that many unique Loggers over time? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]