Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12494

Search Application is using getSpaces() for Database Search

    Details

    • Difficulty:
      Medium
    • Similar issues:

      Description

      DatabaseSearch is using getSpaces() which is not scalable with a large number of spaces:

      ## ---------------
      ## Space filtering
      ## ---------------
      #set($spaces = $xwiki.spaces)
      ...
          #foreach($space in $spaces)
            #if (!$blacklistedSpaces.contains($space) && $xwiki.hasAccessLevel('view', "${space}.DocumentReservedForInternalXWikiUsage${mathtool.random(0, 999)}"))
              #spaceoption($space $selectedSpace)
            #end
          #end
      ...
      

        Attachments

          Activity

            People

            • Assignee:
              mflorea Marius Dumitru Florea
              Reporter:
              vmassol Vincent Massol
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 4 hours
                4h