Fastest way to destroy a tree structure in VB6 -


i have code in vb6 creates moderately-large tree structure (a few thousand nodes). performance adequate except when destroying last reference tree. can take second or more. i've tried killing internal references within each node before deleting node itself, doesn't seem help. there trick speed whatever vb6 doing reference counters? there seems significant n^2 aspect performance.

incidentally, know vb6 obsolescent, have complaining code wrote quite time ago still in use.

btw, tree not binary tree, instead allows each node have arbitrary number of children, held in collection , accessed name (so 1 node might thetree!this!that!theotherthing!whatever, aka thetree("this")("that")("theotherthing")("whatever")).

vb6 collection objects notorious being slow release contents, esp when there's lot of contained references.

you might try replacement collection, this. there's number of other replacement collections vb6 should drop in compatible.

you might want read on bruce mckinney's take on collection object.

edit: more bruce mckinney info here


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -