This issue has been created
There are 2 updates, 3 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-4682e41c-fa2d-4559-bce2-c4abb33fe6a7 XWIKI-22792 Open

XWiki#getClassList() is very slow on large instances - object editor takes a long time to load on large instances

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-adef598a-ddf5-4df4-ae15-35677cf8599f Anca Luca created this issue on 17/Jan/25 19:07
 
Summary: XWiki#getClassList() is very slow on large instances - object editor takes a long time to load on large instances
Issue Type: cid:jira-generated-image-avatar-4682e41c-fa2d-4559-bce2-c4abb33fe6a7 Bug
Affects Versions: 16.4.6
Assignee: Unassigned
Components: Old Core
Created: 17/Jan/25 19:07
Priority: cid:jira-generated-image-static-major-d418ba13-c026-44d2-8870-9e22b27599bf Major
Reporter: Anca Luca
Description:

The function to fetch all XClasses of XWiki is using the following query, which is very slow on large XWiki instances:

{code language='sql'}

select doc.fullName from XWikiDocument as doc where (doc.xWikiClassXML is not null and doc.xWikiClassXML like '<%')

 
                              

This function is called when loading the object editor, for displaying the new object form. On large instances, this function is very slow which makes the loading of the object editor very slow for any document, regardless of the number of objects of the document in question.

The field xWikiClassXML in the documents table is not indexed, a manual index on this field may be a workaround.

 
 

2 updates

 
cid:jira-generated-image-avatar-adef598a-ddf5-4df4-ae15-35677cf8599f Changes by Anca Luca on 17/Jan/25 19:08
 
Description: The function to fetch all XClasses of XWiki is using the following query, which is very slow on large XWiki instances:

{code language=' : sql ' }
select doc.fullName from XWikiDocument as doc where (doc.xWikiClassXML is not null and doc.xWikiClassXML like '<%')

{code}

This function is called when loading the object editor, for displaying the new object form. On large instances, this function is very slow which makes the loading of the object editor very slow for any document, regardless of the number of objects of the document in question.

The field xWikiClassXML in the documents table is not indexed, a manual index on this field may be a workaround.
Labels: performance
 
 

3 comments

 
cid:jira-generated-image-avatar-adef598a-ddf5-4df4-ae15-35677cf8599f Anca Luca on 17/Jan/25 19:10
 

The reason for this odd query are historical:

https://github.com/xwiki/xwiki-platform/commit/31f5c5a185f2c54044915a9ebdfc235e88a8510d

and

https://github.com/xwiki/xwiki-platform/commit/bbe715bad07fa5858afed7311737c9a69a2bcb0d#diff-9029b3381158c4d58863a68b26547f749586b8c43736c241696e32fa962adfbaR1551

thanks Simon Urli for looking them up.

 
cid:jira-generated-image-avatar-adef598a-ddf5-4df4-ae15-35677cf8599f Anca Luca on 17/Jan/25 19:10
 
The reason for this odd query are historical:

https://github.com/xwiki/xwiki-platform/commit/31f5c5a185f2c54044915a9ebdfc235e88a8510d

and

https://github.com/xwiki/xwiki-platform/commit/bbe715bad07fa5858afed7311737c9a69a2bcb0d#diff-9029b3381158c4d58863a68b26547f749586b8c43736c241696e32fa962adfbaR1551


It seems oracle needed it at some point...

thanks [~surli] for looking them up.
 
cid:jira-generated-image-avatar-adef598a-ddf5-4df4-ae15-35677cf8599f Anca Luca on 17/Jan/25 19:11
 
The reason for this odd query are historical:

https://github.com/xwiki/xwiki-platform/commit/31f5c5a185f2c54044915a9ebdfc235e88a8510d

and

https://github.com/xwiki/xwiki-platform/commit/bbe715bad07fa5858afed7311737c9a69a2bcb0d#diff-9029b3381158c4d58863a68b26547f749586b8c43736c241696e32fa962adfbaR1551

It seems oracle
needs it / needed it at some point...

thanks [~surli] for looking them up.