]> Sergey Matveev's repositories - public-inbox.git/commit
view: msg_html: reduce memory use on reused MIDs
authorEric Wong <e@80x24.org>
Sun, 5 Jan 2020 09:51:16 +0000 (09:51 +0000)
committerEric Wong <e@80x24.org>
Sun, 5 Jan 2020 23:32:29 +0000 (23:32 +0000)
commit033f628b52ebacf4a7bf8795084ba5ec498004bf
treedf9a472915b9f1232b60921e0226d77842fc1055
parente3e8cab265fe79e4984d59ee180f2dbc8d4ef6f1
view: msg_html: reduce memory use on reused MIDs

In rare cases where Message-IDs get reused, we do not want to
hold onto the large Email::MIME objects in memory after showing
the first message.  So discard each message as soon as we're
done using it so we can save memory for the next message.

The new and expensive xt/mem-msgview.t test shows a nearly 14MB
reduction for two ~7MB messages.  run_script() also gets
upgraded to make it easier to pass large inputs via IO GLOBs.
MANIFEST
lib/PublicInbox/TestCommon.pm
lib/PublicInbox/View.pm
xt/mem-msgview.t [new file with mode: 0644]