IHierarhyNode interface is designed to accelerate the performance for hierarchical data in XAF application. Compared with
This post describes the results of comparing the performance of the processing of hierarchical data in XAF application. Results was obtained for Win platform. HierarchyNode solution includes 4 types of hierarchical objects:
HierarchyNodeObject implements Xafari.Base.IHierarchyNode interface, it supports only one hierarchy.
HierarchyNodeDescendant implements Xafari.Base.IHierarchyNode interface, it supports 4 hierarchies.
HierarchicalClassifierItemDescendant implements HierarchicalClassifierItem interface.
We have monitored the following values:
- the time of loading the data into List View
- the time of expanding the node
When testing we used the following editors:
- TreeListEditor to display TreeListObject
- WinExplorerListEditor to display HierarchyNodeObject, HierarchyNodeDescendant
- WinHierarchyNodeListEditor to display HierarchyNodeObject, HierarchyNodeDescendant and HierarchicalClassifierItemDescendant
Tested count = 2345 objects. Objects generated as follows:
private void SetHierarchyNodeObjectDescendant()
string name = "Node_0";
HierarchyNodeDescendant theObject = ObjectSpace.FindObject(CriteriaOperator.Parse("Name=?", name));
if (theObject == null)
name = "Node_";
for (int i = 0; i < count; i++)
theObject = ObjectSpace.CreateObject();
theObject.Name = name + i;
if (i >= count/2)
theObject.Parent = ObjectSpace.FindObject(CriteriaOperator.Parse("Name=?", "Node_1"));
Other types of data were generated similarly.
The table below shows obtained results (time in milliseconds).
|Tree List Editor||Win Explorer List Editor||Win Hierarchy Node List Editor|
|Tree List Object||Hierarchy Node Object||Hierarchical Classifier Item||Hierarchy Node Desc||Hierarchy Node Object||Hierarchical Classifier Item||Hierarchy Node Desc|
1 – the time of loading the data into List View.
2 – the time of expanding the node.
Let see results in diagram form. First figure shows the time of loading the data into List View, depending on the editor.
Second figure shows the time of first expanding the node, depending on the editor.
When working with large amounts of data using WinExplorerListEditor was more effective compared to TreeListEditor and WinHierarchyNodeListEditor. WinHierarchyNodeListEditor and TreeListEditor gave almost equal performance. But WinExplorerListEditor has uploaded the data 21 times faster, and expanded the first node 14 times faster.
WinExplorerListEditor loaded HierarchicalClassifierItem objects 42 times faster and expanded the node 300 times faster.
HierarchyNodeDesc object, implements 4 hierarchy, reaching almost the same results with the HierarchyNodeObject object, which implements only one hierarchy. This indicates that the presence of multiple hierarchy has no significant effect on the performance of the editor.
Topics in this section provide detailed information on hierarchical data in Xafari: each UI element.
To learn about the business model design, please refer to the following documentation sections:
The listed topics provide information on how to Xafari supports hierarchical data properly declare your data classes
For more detailed information examine HierarchyNode solution and refer to the following topics.