2011-01-25 18:11 UTC
I have a Tree List control that is taking too long to fill the members.
In the default installation, there are about 50 parent elements, with 700 child elements in up to 4 levels of hierarchy.
In that case, it takes about 3 seconds to populate the tree list.
Yet we are getting power users who have had the software for over 5 years now, and they can have upwards of 5,000 child elements, in which case it is taking closer to 7 seconds to populate the tree list.
So before I rewrite the rather involved requery function, I am inquiring if you know if I will be able to get the speed improvement I am after. Essentially, I'm wondering if instead of passing each item one at at time, if I pass all the parent elements as a list of lists to a single dcl_tree_AddParent call, and then only have the 50 or so calls to dcl_tree_AddChild, again with the list of lists -- will that see a performance gain from calling them individually?
Or, of course, if you happen to know if the performance hit is from the tree list control itself rather than the dcl_tree function calling, then I would instead need to go the far more involved route of adding the child members on the fly from the Expand event.
In either case, I've got my work cut out for me, so I thought I'd ask for your thoughts first.
Many thanks for any pointers!
--J
In the default installation, there are about 50 parent elements, with 700 child elements in up to 4 levels of hierarchy.
In that case, it takes about 3 seconds to populate the tree list.
Yet we are getting power users who have had the software for over 5 years now, and they can have upwards of 5,000 child elements, in which case it is taking closer to 7 seconds to populate the tree list.
So before I rewrite the rather involved requery function, I am inquiring if you know if I will be able to get the speed improvement I am after. Essentially, I'm wondering if instead of passing each item one at at time, if I pass all the parent elements as a list of lists to a single dcl_tree_AddParent call, and then only have the 50 or so calls to dcl_tree_AddChild, again with the list of lists -- will that see a performance gain from calling them individually?
Or, of course, if you happen to know if the performance hit is from the tree list control itself rather than the dcl_tree function calling, then I would instead need to go the far more involved route of adding the child members on the fly from the Expand event.
In either case, I've got my work cut out for me, so I thought I'd ask for your thoughts first.
Many thanks for any pointers!
--J