Loading large hierarchy can produce thousands of calls to getChildNodes
Description
Attachments
relates to
Activity

Francisco Saez December 11, 2017 at 8:03 AM
Evaluation tool comes from contrib and it's not available in the QA servers. I tested it in my local in "demo" mode with a profiling tool.
Someone with evaluation tool in a real environment can confirm the performance upgrade?
Neal Caidin December 5, 2017 at 8:51 AM
This looks hard to test. How can we get it verified? Is it being used somewhere production?

Francisco Saez November 17, 2017 at 7:25 AMEdited
The proposed pull requests try to upgrade the performance for the method HierarchyRenderUtil::renderHierarchyNode.
This is the calls tree for that method:
(external)getChildNodes
(provider)getChildNodes
(hierarchy)getChildNodes ---> cache
(external)getEvalGroupsForNodes
(provider)getEvalGroupsForNodes
(provider)getEvalGroupNodesByNodeId
(hierarchy)getChildNodes
(hierarchy)getNodesByIds
(external)getEvalGroupsForNodeSectionAware
(external)getEvalGroupNodeByNodeId
(external)getEvalGroupNodesByNodeId
(external)getRulesByNodeID
(external)checkNodeExists
(external)getNodeById ---> cache
(provider)getNodeById
(hierarchy)getNodeById ---> cache
As you can see, we have added a cache system at two levels :
In the ExternalHierarchyLogicImpl (inside evaluation)
In the HierarchyServiceImpl (inside hierarchy)
Here, an image with the difference between three files:
nocache.txt : Original system
cache.txt : Cache implemented in both levels (evaluation and hierarchy)
halfcache.txt : Cache implemented only in hierarchy
As you can see, we have reduced the calls to "getNodeMeta" from 1812 to 284.
These three files are also included:

Francisco Saez November 16, 2017 at 2:25 AM
We have noticed that the hierarchy loading is so long because, every time somebody clicks on expand/collapse, the entire tree is refreshed. What if we only update the affected element by ajax (I don't know if this is possible with RSF)?
What do you think?
Details
Priority
CriticalAffects versions
Fix versions
Components
Assignee
Sam OttenhoffSam OttenhoffReporter
Sam OttenhoffSam Ottenhoff
Details
Details
Priority
Affects versions
Fix versions
Components
Assignee

Reporter

1) Need thousands of sites in system
2) Setup 3-level hierarchy
3) View hierarchy in tools like Evaluations -> Administrate -> Control Hierarchy