Commits

Sebastian Sdorra committed c18980a

reduce cached memory by using a copy of the activities sublist

Comments (0)

Files changed (1)

src/main/java/sonia/scm/activity/ActivityManager.java

 
 //~--- non-JDK imports --------------------------------------------------------
 
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Ordering;
 import com.google.common.collect.Sets;
 import com.google.inject.Inject;
 
     if (activitySet.size() > pageSize)
     {
-      activityList = activityList.subList(0, pageSize);
+      activityList = ImmutableList.copyOf(activityList.subList(0, pageSize));
     }
 
     return new Activities(activityList);