[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-21 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15341225#comment-15341225 ] Remko Popma commented on LOG4J2-1434: - Good catch! capacity() is probably better. I usually run JMH

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-20 Thread Luke Butters (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15341127#comment-15341127 ] Luke Butters commented on LOG4J2-1434: -- I also noticed your code: {code} protected static void

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-20 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15340736#comment-15340736 ] Remko Popma commented on LOG4J2-1434: - By the way, Luke, thank you for raising this issue and pushing

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-20 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15340721#comment-15340721 ] Remko Popma commented on LOG4J2-1434: - I have no issue with the idea of StringBuilder as a closeable

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-20 Thread Luke Butters (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15340655#comment-15340655 ] Luke Butters commented on LOG4J2-1434: -- I had not considered that. I don't mind as it is not my code

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-20 Thread Luke Butters (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15340646#comment-15340646 ] Luke Butters commented on LOG4J2-1434: -- We could keep the existing {{getStringBuilder()}} and mark

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-20 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15339564#comment-15339564 ] Remko Popma commented on LOG4J2-1434: - I am not a fan of introducing a new Provider to obtain the

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-20 Thread JIRA
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15339410#comment-15339410 ] Mikael Ståldal commented on LOG4J2-1434: Can we make the interface generic over StringBuilder?

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-19 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15338456#comment-15338456 ] Remko Popma commented on LOG4J2-1434: - I could be wrong but I think only GelfLayout has a second

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-19 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15338455#comment-15338455 ] Remko Popma commented on LOG4J2-1434: - Oh, now I see what you mean. Okay, that's definitely something

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-19 Thread JIRA
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15338445#comment-15338445 ] Mikael Ståldal commented on LOG4J2-1434: I just applied a similar fix to a private StringBuilder

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-19 Thread JIRA
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15338441#comment-15338441 ] Mikael Ståldal commented on LOG4J2-1434: After a second thought, not turn off all ThreadLocals

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15338230#comment-15338230 ] Remko Popma commented on LOG4J2-1434: - Mikael, why do you want this? I'm not sure we can deliver

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-18 Thread JIRA
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15337973#comment-15337973 ] Mikael Ståldal commented on LOG4J2-1434: Perhaps we need a way to turn off the use of all

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-18 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15337591#comment-15337591 ] Remko Popma commented on LOG4J2-1434: - Aha! Are you thinking of revisiting LOG4J2-1116? That would be

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-17 Thread Ralph Goers (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15337571#comment-15337571 ] Ralph Goers commented on LOG4J2-1434: - This seems like it is getting more and more complicated, and

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-17 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15337380#comment-15337380 ] Remko Popma commented on LOG4J2-1434: - Where possible I prefer not to store non-JDK classes in

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-17 Thread Luke Butters (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15337187#comment-15337187 ] Luke Butters commented on LOG4J2-1434: -- Note that my assumption is we want to remember to call

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-17 Thread Luke Butters (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15335500#comment-15335500 ] Luke Butters commented on LOG4J2-1434: -- Ah another way which seems to run at about the same speed as

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-17 Thread Luke Butters (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15335479#comment-15335479 ] Luke Butters commented on LOG4J2-1434: -- That would be better than what we have, although not the

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-16 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15335019#comment-15335019 ] Remko Popma commented on LOG4J2-1434: - You are right. Some background: Log4j only checks the

[jira] [Commented] (LOG4J2-1434) StringBuffer in ThreadLocal can cause excessive memory usage after large log messages

2016-06-16 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15334951#comment-15334951 ] Remko Popma commented on LOG4J2-1434: - I don't think I misread. :-) I don't really see how the