On 2012-03-20 09:07, Thomas Mueller wrote:
...
about "flat or not". Forcing getNodes to return things as a hierarchy,
when it also could be a list of objects, decorated with a path, will
make it harder than it needs to be to process efficiently.

So far I didn't think this is a problem, but I'm not sure if I understand
what you mean exactly. Could you give a example how an alternative
representation would look like?
...

Right now we return a tree, such as:

"a" : { ":childCount" : 1, "title" : "foo",
        "b" : { ":childCount" : 0, "title" : "bar" }
}

The idea would be to return an array of leaf nodes, keyed by their identifiers.

Such as

[ "a" : { ":childCount" : 1, "title" : "foo" } ],
[ "a/b" : { ":childCount" : 0, "title" : "bar" } ]

etc...

The benefit is that it's slightly easier to process in a streaming way, because it's just an iterator over node infos, instead of a tree.

Best regards, Julian

Reply via email to