Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.4.2
-
None
-
Unknown
-
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