TWiki::Render::summariseChanges() calls TWiki::Merge::simpleMerge(), which calls Algorithm::Diff::traverse_balanced(), which may cause out-of-memory with a topic bigger than two megabytes. The limit may vary depending on the version of Algorithm::Diff and other factors. So TWiki::Render::summariseChanges() should have a way to omit a call to TWiki::Merge::simpleMerge() depending on the size of the topic text.
For that, $TWiki::cfg{SummariseChangesLimit} is introduced to specify the limit. Either of the compared versions is bigger than the limit, the summary is "Text is too big to show the difference." or a translation of it. If $TWiki::cfg{SummariseChangesLimit} is zero or undefined, the prior behavior remains -- TWiki::Merge::simpleMerge() is called regardless of text size.
At least,
MailerContrib's tools/mailnotify ends prematurely if a large topic is updated since its last run under certain circumstances.
--
TWiki:Main/HideyoImazu - 2014-10-02