Performance issue of adding many items to a sorted wxDVC
|Reported by:||koichi||Owned by:|
On wxMSW, adding a huge items to wxDVC takes too long when the tree has sorting column. This is because the tree is sorted every time an item is added. While the behavior is slightly different depending on OSes, the same problem exists on wxGTK, and probably on wxOSX.
In principle, the tree should be sorted only once after the entire items are added. Even if only a part of nodes needs to be sorted after items are added, it is difficult to check which nodes need to be sorted and which nodes need not, and when adding many items, sorting the entire tree is much much faster than sorting a parent node every time an item is added.
Since ItemsAdded internally calls wxDataViewModelNotifier::ItemAdded for each item, I want to temporarily disable sorting function before calling ItemsAdded, and after that call wxDataViewModelNotifier::Resort once.
Is there a good way to temporarily disable sorting?
Change History (8)
comment:4 Changed 20 months ago by vadz
- Status changed from new to confirmed
- Summary changed from Performance issue of sorting/adding items in wxDVC to Performance issue of adding many items to a sorted wxDVC