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

DBList request level cache is ignored

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.2
    • Fix Version/s: 2.5 M2, 2.4.4
    • Component/s: {Unused} Cache
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Because of fix XWIKI-1725, when the cache for DBlist is stored in the context, it will be ignored.

      See the code change here:
      https://fisheye2.atlassian.com/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/objects/classes/DBListClass.java?r1=4500&r2=4852&u=3

      I don't understand why XWIKI-1725 was needed. getCachedDBList already checks if the cache is set and if it's not set it will use the DBlist object stored in the context which is a request level cache only and should ALWAYS be used as it's only valid for the second call to the map in the same request.

      The effect of this code is slow livetable when multiple DBlist and used and many lines are shown. There will be as many queries to the Database as lines shown x number of DB lists field, when we should have only as many queries as the number of DB list fields. This can lead to a livetable results taking 1 second and lots of DB load when it should render in 150ms

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              ludovic Ludovic Dubost
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: