-
Type:
Bug
-
Status: RESOLVED
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.8.1, 2.9.0
-
Component/s: Portal
-
Labels:
-
11 status:Resolved
When the admin logs into a Sakai instance with access to 2K+ sites, the performance of the system becomes terribly poor. A profiler tool (jprofiler) shows that there is one method that takes in account about 70% of the running java code time for most requests. This method is SiteNeighbourhoodServiceImpl.listIndexOf(String, List). Further research learns that the method is called extremely often from SiteNeighbourhoodServiceImpl.getAllSites(HttpServletRequest, Session, boolean) method.
The code seems extremely inefficient, because it theoretically hits site.getId() exponentially with the site count.
The fix seems easy though, I'll attach it as patch.