In a context where you need to obtain the whole list the Martijn solutions sounds better in my ears because the Andreas one do more times the bottleneck<br><br>In a context where you will complete the list as soon as you need (as Zope Smart Manager) the Andreas one sounds better<br>
<br>Only my point of view ;)<br><br><div class="gmail_quote">2008/10/21 Andreas Jung <span dir="ltr">&lt;<a href="mailto:lists@zopyx.com">lists@zopyx.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On 21.10.2008 18:25 Uhr, Martijn Pieters wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Oct 21, 2008 at 18:10, Andreas Jung&lt;<a href="mailto:lists@zopyx.com" target="_blank">lists@zopyx.com</a>&gt; &nbsp;wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You have to split the complete processing over several EPI queries where a<br>
single query returns all elements with level=1 for a particular subfolder.<br>
You can sort_on=&#39;position&#39; within each query. And paste the results in some<br>
way together. Nobody said that EPI would solve the problem out-of-the-box<br>
:-)<br>
</blockquote>
<br>
Right, so with sufficient levels you end up with a *lot* of queries.<br>
<br>
Why not just query for the whole lot and use one method that returns a<br>
(path, position) tuple for a given item, and pass that to the sort<br>
function as the key keyword? Should be a lot better performing.<br>
</blockquote>
<br>
<br></div>
If this would be a programming contest then you would cache the results and don&#39;t care about the performance for the initial calculation.<br><font color="#888888">
<br>
Andreas<br>
</font><br>_______________________________________________<br>
Zope maillist &nbsp;- &nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">http://mail.zope.org/mailman/listinfo/zope</a><br>
** &nbsp; No cross posts or HTML encoding! &nbsp;**<br>
(Related lists -<br>
&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Mis Cosas<br><a href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a><br>Zope Smart Manager<br><a href="http://blogs.sistes.net/Garito/670">http://blogs.sistes.net/Garito/670</a><br>