In above thread is a class which scans a directory structure to build a object tree based on the folder structure.
Unfortunately the search is somewhat slower then another approach which uses stringlists.
In both cases I want to display a folder with his children and the size of files in every child, as well as for the parent folder. It is possible from here to browse through the object tree, because every object contains a tlist with its children, who still refer to the parent. Browsing need no recalculation, since all values are stored in a object. Problem is that the object might be too big, but on the other hand I dont know how to reduce complexity of object without missing the advantages using it.
The object tree need to create an object for every folder. This seems to slow down the process. However, having all the size infos in every folder object makes it great to browse. Also the usage of the class is very easy since I heavily relay (e.g. in a Virtualtreeview to display the stuff) on the advantage using an object e.g.: sizetree.foldername or sizetree.totalsize or so.
Is there an approach to make the thing faster, at the same time still providing some convenience when using (not calculate again everytime I select a child at new parent)