Subcases and Hierarchy
fogcreek.com
fogcreek.com
If you Americans insist on writing French with such a horrible accent, I'm going to start raiting English vit my Finnish äksent. Rivendz vil pi sviit.
When I was faced with this problem, I used a dynamically sized bit vector field as an id and indexed it lexicographically. When a node is inserted, it's assigned the id of its parent appended with a 0 or 1, depending on its relationship to the parent. Thus, ids are unlimited and never have to be reassigned. Selecting a subtree is just a single range search. For a non-binary tree, a vector of some other type can be used.
I got the idea from this: http://en.wikipedia.org/wiki/Surreal_numbers
It's possible you could do the deletions silently, because you don't actually care about gaps. But I don't see any way around inserts being expensive.
Thanks for the tip :)
The entire content is that FogBugz has met a routine feature request. This belongs in the FogBugz changelog, not on a news site.
On a more substantive note they did describe how their first implementation failed a usability test.