2008/5/7 Jamie McCracken <<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>>:<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>
> 2008/5/7 Jamie McCracken <<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>>:<br>
><br>
> On Wed, 2008-05-07 at 16:29 +0200, Jos van den Oever wrote:<br>
> > 2008/5/7 Jamie McCracken <<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>>:<br>
> > > we need ranges in order to search efficiently - having<br>
> potentially<br>
> > > random hit IDs passe to that function means we cannot<br>
> optimise (no way<br>
> > > to tell in advance if its a range)<br>
> > ><br>
> > > Its so bad that we will add an extension GetPagedHits<br>
> ourselves if no<br>
> > > one else wants it!<br>
> ><br>
> > You're seeing ghosts. It's trivial and very quick to check<br>
> if a range<br>
> > of numbers is sequential.<br>
> > If it's sequential, you can use your optimized range<br>
> function, if not,<br>
> > get the hits one by one. For the later you need a function<br>
> anyway.<br>
> ><br>
><br>
><br>
> Jamie? Can you comment on Jos' answer? If you implement paged hit<br>
> retrieval anyway, it would be a very cheap optimization to check if<br>
> 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't know that. That is of course an important factor. I have
anticipated dbus not being a greased lightning, but not exactly slow.<br> </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 nor break other xesam apps<br>
<div class="Ih2E3d"><br>
<br>
><br>
> If it is not enough to simply change the documentation of GetHitData<br>
> to imply that it is more advanced way to retrieve hits (and not mainly<br>
> a tool to use on HitsModified), can you then be more specific about<br>
> your needs (for the method)? I am thinking:<br>
><br>
> * A use case - No app I know of will require the API you describe.<br>
> Not even the native Tracker search tool (it can only scroll pages<br>
> sequentially). Anywhere libbeagle is usable, so is Xesam, but with a<br>
> 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'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;">
> * Should it take an array of fields to retrieve, or use the<br>
<div class="Ih2E3d">> 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>