[
https://issues.apache.org/jira/browse/LOG4J2-2724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16976601#comment-16976601
]
Dzmitry Anikechanka commented on LOG4J2-2724:
---------------------------------------------
Hi [~rpopma],
Thanks for quick response!
Unfortunately I cannot reproduce such case now (I just don't have enough time)
but I clearly remember that for 80Mb log message SimpleMessage object size was
~160Mb. It sounds logically that both fields will reference the same memory, so
I definitely should double check this.
Let me investigate it once I will have a chance.
Thanks,
Dzmitry
> SimpleMessage - message duplication (String and CharSequence fields)
> --------------------------------------------------------------------
>
> Key: LOG4J2-2724
> URL: https://issues.apache.org/jira/browse/LOG4J2-2724
> Project: Log4j 2
> Issue Type: Bug
> Components: API
> Affects Versions: 2.12.1
> Reporter: Dzmitry Anikechanka
> Priority: Minor
>
> org.apache.logging.log4j.message.SimpleMessage class contains 2 fields:
> {code:java}
> private String message;
> private transient CharSequence charSequence; {code}
> These 2 fields contains the message that should be logged.
> So as the result the message is duplicated and it can cause significant
> payload on memory in case of logging large messages.
> Could you please fix it or explain why the message is duplicated?
> Thanks,
> Dzmitry
--
This message was sent by Atlassian Jira
(v8.3.4#803005)