-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 7.10
-
Component/s: Publishing
-
Backlog priority:700
-
Sprint:nxAT Sprint 9.1.2, nxcore 9.1.4, nxcore 9.2.1
-
Story Points:3
Each time an entry in the publication tree is unfold, hundreds of queries are run to get the entry children.
Logging the slow queries with a trigger at 1 ms is helpful to detect that too many queries are run, even if the cost of each query is small.
All the queries look like this one
[SessionImpl] duration_ms: 1.76 QueryFilter(principal=Administrator, limit=0, offset=0) query SELECT * FROM Document WHERE ecm:parentId = '04191c91-bdd8-4381-8629-5d2c9ed1e427' AND ecm:currentLifeCycleState != 'deleted'AND ecm:mixinType IN ('PublishSpace') AND ecm:mixinType NOT IN ('HiddenInNavigation'){{RemoteAddr,10.213.3.23}{RequestURL,http://nereid2:8080/nuxeo/view_documents.faces}{ServletPath,/view_documents.faces}{SessionID,D6883E863AC45040899BAB7A5D68CB6C.nuxeo}{UserPrincipal,Administrator}}
The problem seems related to the methods ProxyTree#getChildrenNodes and AbstractRemotableNode#getChildrenNodes (called from ProxyNode) which does not have a cache and which are called many times during the rendering of the JSF page.
There may be other methods which need a cache, like AbstractRemotableNode#getChildrenDocuments