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
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 | +----+-------------+-------+------+---------------+------+---------+------+---------------+-------------+