Tree Arrays: putting XML in nested arrays

David Bovill david.bovill at gmail.com
Thu Jan 1 14:13:07 EST 2009


2009/1/1 Trevor DeVore <lists at mangomultimedia.com>

>
> With your design you are assuming that you will always be working on the
> entire tree. With my design I want each node of the array to be self
> contained so that it can be treated as a part separate from the whole. I can
> extract a node like this:
>
> put theTreeA[root]["node_1"] into theNodeA
>
> and I have all of the data relevant to that node.


Ah - OK. But this would only be one extra line and practically as fast:

put theTreeA[root]["node_1"] into theNodeA
> put theTreeA[@attributes][root]["node_1"] into theNodeA
>


> For how I work this is the logical approach given that I am not
> experiencing any speed issues. Have you benchmarked filter to see how badly
> it affects performance in your use cases?


No - but the processing is recursive to rebuild trees from the data
structure for expanding and collapsing lines, or indeed just about any
processing of the tree structure. If the tree structure is large with
hundreds of nodes this becomes important. A filter command be called on each
recursion for every node of the tree processed.



More information about the use-livecode mailing list