jenkinsci/perforce-plugin — pull request #18 by miktap (2012-04-03 12:43:27+00:00)
Title: [JENKINS-13109] Huge changelogs eat all the Java memory

Regarding https://issues.jenkins-ci.org/browse/JENKINS-13109. Perforce Changelist and FileEntry objects are reserving quite a lot of Java heap space. Limiting the amount of files shown for each changelist helps, especially with large changelists. Also I noticed that each FileEntry object for a Changelist owns a HashMap field for resolving the action type (add, edit, delete, ...). I'm sure this could be done smarter way, from memory consumption perspective.

Anyway, these changes helped our case. By default all the files are shown. It's bit poorly implemented in a way that with value 0 all the files are listed instead of not showing any files.