Analysis of the heap dump of an OOM on Nemo in INFRA-1378 highlighted a huge memory footprint of the ScmInfoRepository when analyzing the Open JDK project:
Having a closer look, it appears most memory usage is made of String (char) objects and apparently because of the author of each line. Two lines with the same author are not using the same String object:
A good way to avoid this waste of memory would be to use String.intern. See this article http://java-performance.info/string-intern-in-java-6-7-8/ for a discussion on the performance impact in term of CPU, in particular. This other article https://plumbr.eu/blog/memory-leaks/reducing-memory-usage-with-string-intern is also interesting with a fair warning when comparing intern string and regular strings (nasty bug).
Note, that revisions could also be interned.