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

BaseObject should generate unique id only when needed

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Right now BaseObject#guid get initialized in BaseObject constructor no matter what. That means that everytime you load an object from the database the guid is initialized and then overwritten with the one from the database...

      UUID.randomUUID() being quite expensive sometimes it would be better to generate the guid only in getGuid() if it's null.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: