[dev] Re: datatree::getSortedTree() patch

Duck duck at obala.net
Sun Apr 3 16:39:31 PDT 2005


On Saturday 02 of April 2005 18:26, Chuck Hagenbuch wrote:
> Quoting Duck <duck at obala.net>:
> > return only the datatree ids but the standard "id,name,parents,order"
> > pairs so the results are identical to the _load(), just that they are
> > sorted.
>
> Committed, thanks.
>
> -chuck

Now that _load() and getSortedTree() are practical identical. Do you think 
that the get() method and the tree management in generel could be changed to 
use the optional sorting? 

This will results in a performace bust for a lot of cases when we resort the 
tree by its attributes. Like in Agora. With a this change we will not need to 
access the DB twice (first to get the ids and that to sort the thread) but we 
will get the ordered tree at once.

Duck


More information about the dev mailing list