On Sun, Feb 19, 2006 at 06:08:40PM -0600, Edward Summers wrote:
> If you find out anything and have the time please post your findings  
> here for the rest of us :-)

Thanks for the pointers.

On further investigation I discovered the present() method in
Net::Z3950::ResultSet.

This pre-fetches a given range of results in one shot.

So, rather than a simple loop around the resultset, I now do something
like:

        for my $i (1 .. $numrec) { 
                $rs->present($i, 20) unless $i % 20;
                my $zrec = $rs->record($i);
        }

The time it takes to fetch each batch varies significantly (sometimes
over 5 seconds), but I haven't yet seen a pattern to it that would imply
throttling. At a guess I would say it's more likely to be a queueing
system at the far end.

I need to do some more analysis to work out what the most effective
quantity is to pre-fetch at a time, but this seems to work nicely for
now.

Thanks,

Tony

Reply via email to