2008/5/7 Jamie McCracken &lt;<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>&gt;:<br><div class="gmail_quote"><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"><br>
On Wed, 2008-05-07 at 20:44 +0200, Mikkel Kamstrup Erlandsen wrote:<br>
&gt; 2008/5/7 Jamie McCracken &lt;<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>&gt;:<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; On Wed, 2008-05-07 at 16:29 +0200, Jos van den Oever wrote:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; 2008/5/7 Jamie McCracken &lt;<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>&gt;:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &gt; &nbsp;we need ranges in order to search efficiently - having<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; potentially<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &gt; &nbsp;random hit IDs passe to that function means we cannot<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; optimise (no way<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &gt; &nbsp;to tell in advance if its a range)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &gt; &nbsp;Its so bad that we will add an extension GetPagedHits<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ourselves if no<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &gt; &nbsp;one else wants it!<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; You&#39;re seeing ghosts. It&#39;s trivial and very quick to check<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; if a range<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; of numbers is sequential.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; If it&#39;s sequential, you can use your optimized range<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; function, if not,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; get the hits one by one. For the later you need a function<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; anyway.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>
&gt;<br>
&gt;<br>
&gt; Jamie? &nbsp;Can you comment on Jos&#39; answer? If you implement paged hit<br>
&gt; retrieval anyway, it would be a very cheap optimization to check if<br>
&gt; hit_ids are sequential in GetHitData and then take the optimized path.<br>
<br>
</div>I can see it working but it is a hack - and we all agree on that<br>
<br>
If you dont wanna get bugged by devs wanting to know how to do paged<br>
searches all the time then i would suggest adding the API pronto :)<br>
<br>
Bear in mind dbus is slow on nokia and the added type checking all adds<br>
up as well as checking if the array is sequential.</blockquote><div><br>I didn&#39;t know that. That is of course an important factor. I have
anticipated dbus not being a greased lightning, but not exactly slow.<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Nokia devs are doing<br>

a lot of work profiling tracker to squeeze every ounce of performance<br>
out of it (if you had not noticed, latest version is pretty much the<br>
fastest indexer as latest linux source is indexed in under 4 mins)<br>
<br>
for their sake, Im adding GetPagedHits for their usage and maybe TST<br>
only so it should not subvert your spec &nbsp;nor break other xesam apps<br>
<div class="Ih2E3d"><br>
<br>
&gt;<br>
&gt; If it is not enough to simply change the documentation of GetHitData<br>
&gt; to imply that it is more advanced way to retrieve hits (and not mainly<br>
&gt; a tool to use on HitsModified), can you then be more specific about<br>
&gt; your needs (for the method)? I am thinking:<br>
&gt;<br>
&gt; &nbsp;* A use case - No app I know of will require the API you describe.<br>
&gt; Not even the native Tracker search tool (it can only scroll pages<br>
&gt; sequentially). Anywhere libbeagle is usable, so is Xesam, but with a<br>
&gt; more advanced interface.<br>
<br>
</div>well we will want to do variable paging so it gets stuff as you scroll -<br>
it can be random too as you can move the scroll bar anywhere so yeah TST<br>
would like it</blockquote><div><br>If someone writes a GtktreeModel paging in hits as you scroll (via
proxy objects to get row heights and scroll bar size right), I&#39;d love a
ping.<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; &nbsp;* &nbsp;Should it take an array of fields to retrieve, or use the<br>
<div class="Ih2E3d">&gt; hit.fields property like GetHits?<br>
<br>
</div>I think we would need:<br>
<br>
GetPagedHits<br>
<br>
GetPagedHitData<br>
<br>
to cover all use cases<br>
<font color="#888888"></font></blockquote><div><br>If there is more than one method needed for paging nirvana it begins to make sense to add a org.freedesktop.xesam.PagedSear<div>ch
interface to the spec. This can go in 1.1 (and if we can mature it fast
enough it should not be a problem for Nokia to depend upon it before
1.1 is out). <br>
</div><br><br>Cheers,<br><font color="#888888">Mikkel</font> <br></div></div><br>