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

Solr indexing takes very long when there are many objects with different values

    XMLWordPrintable

Details

    • Unknown

    Description

      Steps to reproduce:

      1. Add 100k different users to a group.
      2. Save the group
      3. Profile XWiki (or just wait until Solr indexing finishes)

      Expected result:

      Solr indexing finishes in a minute or so.

      Actual result:

      Solr indexing takes a long time and 100% CPU on a core. The profile looks like this:

      This profile highlights a loop whose running time is quadratic in the number of values at https://github.com/xwiki/xwiki-platform/blob/3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java#L513-L516

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: