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

Cloning documents with many XObjects and high object numbers is slow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 14.0-rc-1
    • Old Core
    • Unknown

    Description

      Steps to reproduce:

      Clone a document with high object ids and possibly also many XObjects, for example object numbers above 100000 many times (e.g., 50 times). This can, e.g., be seen when viewing an extension document on xwiki.org when the content and the effective metadata author are different and the extension has large object ids.

      Expected result:

      Cloning a document is fast, as we do this all the time.

      Actual result:

      Cloning is slow. The main problem seems to be that it gets 100k times the list of XObjects for a certain XClass document reference from a ConcurrentSkipListMap which performs several comparisons of the document reference. The comparison of document references first serializes them to a string:

      There seem several possible optimizations:

      1. Add a cache to the toString serialization in document references.
      2. Avoid getting the XObject list for every object of the same XClass separately - we could get it once and then add all objects of an XClass to it.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: