Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
11.2, 10.11.4
-
Unknown
-
Description
In order to query the list of all xClass, the XWiki#getClassList() method is always triggering this query on the database: https://github.com/xwiki/xwiki-platform/blob/354a7ecf4f46935c2e564fc34c0372bd4341bd8c/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java#L2258
select doc.fullName from XWikiDocument as doc where (doc.xWikiClassXML is not null and doc.xWikiClassXML like '<%')
On a huge wiki, this query could be very slow, and it is triggered by the object editor for example. There is no caching and the query is far from being optimum:
+----+-------------+-------+------+---------------+------+---------+------+---------------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+---------------+------+---------+------+---------------+-------------+ | 1 | SIMPLE | doc | ALL | NULL | NULL | NULL | NULL | could be huge | Using where | +----+-------------+-------+------+---------------+------+---------+------+---------------+-------------+
Attachments
Issue Links
- is duplicated by
-
XWIKI-22792 XWiki#getClassList() is very slow on large instances - object editor takes a long time to load on large instances
-
- Closed
-
- is related to
-
XWIKI-23944 Allow querying xclasses and their fields (using HQL and possibly Solr)
-
- Open
-