On Tue, Dec 27, 2011 at 10:46 AM, Seth Johnson <[email protected]> wrote: >> >> My approach would scale globally very easily, but yes, traversal might >> get intensive in some contexts. I think optimizing that could be done >> locally and/or in the interface rather than the backend -- no reason >> why you couldn't just do the massive query, then build a list of child >> nodes pointer structure locally on that "cursor set." > > > And note: using an index on the parent key seems to be a very > effective way to do the traversal -- but I haven't tried it on massive > outlines.
And using parent pointers and an index, there's no reason why you can't "window through" a massive tree, so getting the massive query isn't even necessary. Even starting at an arbitrary node in the tree, you can quickly trace up to the top, getting the path from there to the branch you're on, check whether your node is the first child of your immediate parent, get any other coordinate child nodes if necessary -- and then just traverse down x rows from there, just enough to fill a local memory buffer. Rinse and repeat when you page down. Easy. Paging up/going backwards would be more tricky, but the algorithm for limiting how far backward you have to go to make sure you go only a minimal amount necessary to get the previous page's worth is a pretty simple one in my mind. Seth >> In the ancient world, the good designs supported bottomless sized >> structures, by just moving a window through it, swapping pieces into >> memory and on the display. Plus, shockingly enough: my system >> actually allows the return of record-oriented db approaches -- it >> solves the problem of how to work with arbitrarily complex relational >> structure across networks (the basic technical issue that really >> killed dBASE and settled us on SQL) -- you can navigate through >> "tables" and "relations" record-by-record with all the facility with >> which one used to do it using dBASE on the old 8 bit office desktop. >> The horror!: database development for the masses again, with a >> BASIC-like language, now all over the net! :-) -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
