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 10:33 ------- A few thousand distinct logger names implies one monstrous app. I wouldn't ever expect to see something like that running with "a small heap". What kind of app are you writing that has "thousands" of distinct logger names but only a small heap? Note that the number of *loggers* is irrelevant. It's the *names* of those loggers that go into the String.intern pool, so a thousand Logger objects with the same name --> one entry in the intern pool. In addition, the String.intern method says this: "All literal strings and string-valued constant expressions are interned." I've checked this and it is definitely true. So if these loggers are created like Logger l = new Logger("some.literal.string") then that constant string is automatically interned anyway; it happens when the class is loaded. So the CategoryKey call to String.intern isn't adding any new entries to the constant string pool; it simply locates the literal value that was put there by the classloading process. Only when the logger name is dynamically generated like: l = new Logger("foo" + someParam) will the ConstantKey's call to String.intern force the constant string pool to get a new value. And that just isn't a common logging idiom. I really think your initial problem diagnosis is wrong and you should look again. You've clearly got a problem but I find it hard to believe it's due to calls to String.intern. NB: this is all just my personal opinion of course. -- 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]