I have a lot of (hierarchical) data that I display in a TreeView (maybe about 20 thousand units or more, including children). A specific problem with my data is that every object shown in a tree can exist in many treeview elements. I mean, I can have a hierarchy like this:
Item_A -> Item_B -> ItemCItem_B -> Item_CItemC
Suppose that Item_Acontains Item_B, which contains Item_C, as shown above. This means that my list will also show the hierarchy Item_Band Item_C. Now consider that something is happening with the object shown asItem_B(e.g. change of name). Then, of course, both subjects need to be updated. Consider now thousands of elements in a tree structure with complex hierarchies. What strategy would you use to update the tree? Speed, of course, is the main problem here, but also the ease of use and maintenance. I currently hold internal mappings of list items with objects and vice versa to quickly find and update items. Is this the right strategy? After recreating the list after each update, I can throw a lot of code, but I don’t know which paths of the elements were expanded or collapsed. How can I solve this problem? Should I store extended paths in an internal container?
Thanks.
PS: The programming language is C ++, and the GUI lib is QT3.
John