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

Deleting objects might create persistent NULL object in the object list

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Major
    • None
    • 9.10
    • Old Core
    • None
    • Hard

    Description

      When deleting object that are not at the end of the object list, (or when creating object while deleting the tail, which in fact change it not to be the tail anymore), the deleted objects are not really deleted but set to null. Those null objects position are never reused, and the API to reuse them is not really available (at least not obvious and easy).

      Therefore, on a document with frequent delete and creation of objects, even with a few objects, the object number can grow to very large numbers, keeping an enormous amount of empty null objects in the xObjects map.

      The worst scenario is deleting all objects of a given class and adding a new one for that same class, then saving the document. If you repeat that in a loop, this object number will grow infinitely, while having only a single object in the document, you will explode its object map with null objects, progressively making the document very heavy to manipulate.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              softec Denis Gervalle
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: