Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-22908

Performance issue with SiteNeighbourhoodServiceImpl

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.1, 2.9.0
    • Fix Version/s: 11.3, 12.0
    • Component/s: Portal
    • Labels:
    • 11 status:
      Resolved

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  roland Roland Groen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code