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

Querying the list of xClasses is damn slow on a huge wiki

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 11.2, 10.11.4
    • Old Core, Storage
    • None
    • 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

      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

        Activity

          People

            Unassigned Unassigned
            softec Denis Gervalle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: