IHierarchyNode. Performance Comparison | Xafari Framework

IHierarhyNode interface is designed to accelerate the performance for hierarchical data in XAF application. Compared with ITreeNode, its effectiveness becomes appreciable when the amount of the data over 1000 objects.

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:

TreeListObject implements DevExpress.Persistent.Base.General.ITreeNode interface. This is a simple class to implement the tree like structure in DevExpress XAF. Default editor for TreeListObject is DevExpress.ExpressApp.TreeListEditors.Win.TreeListEditor.

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:

Other types of data were generated similarly.

The table below shows obtained results (time in milliseconds).

Tree List EditorWin Explorer List EditorWin Hierarchy Node List Editor
Tree List ObjectHierarchy Node ObjectHierarchical Classifier ItemHierarchy Node DescHierarchy Node ObjectHierarchical Classifier ItemHierarchy Node Desc
114579701739699148983164414399
295716537146439721220488833

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.