[Yazlist] Performance tweaks for async. search?
mike at indexdata.com
Thu Nov 29 18:00:29 CET 2007
Johannes Leveling writes:
> > > So, I want to start processing records at
> > > 17:29:35-28/11 (from the Zebra log), but records become available after
> > > 17:29:56-28/11 (21 seconds later).
> > Er. Now I'm lost. You want to start processing the record
> > before you've retrieved them? Asyncronous event handling won't
> > help you with that, you need a TARDIS!
> No, I want to start processing partial results.
Well, that sounds reasonable enough.
> (I need asynchronous event handling to have non-blocking calls, so
> I can retrieve and convert records in parallel - at least in
Yes; and not just in theory. IRSpy does do this (although its
definition of "processing" records is pretty simple-minded).
> > Are you piggy-backing your searches so that the initial search
> > response includes some of the matching records?
> Aren't there some records available in the first response?
I would think so, yes. If you're using ZOOM, a result-set object is
created at search time, and of course it's initially empty. Once
you've got a response from the server, the hit-count and zero or more
records should be filled in. You can check whether it's so using
$rs->size() and $rs->record_immediate(). Don't just use $rs->record()
as that will synchronously wait for the requested record if it's not
already available, whereas $rs->record_immediate() will return undef.
/o ) \/ Mike Taylor <mike at indexdata.com> http://www.miketaylor.org.uk
)_v__/\ "Bring out your dead ..." -- Monty Python and the Holy Grail.
More information about the Yazlist