|
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:
!clipboard.png!
There seem several possible optimizations:
1. Add a cache of to the {{toString}} serialization to in document reference references . 2. Avoid getting the XObject list for every object of the same time XClass separately - we could get it once and then add all objects of an XClass to it. |
|