On Apr 1, 2008, at 3:12 PM, Carl Stefan Grøtter wrote:
Hello!

I am actually trying to make a script that should browse through about 150.000 objects and compare the data with another (Oracle based) system. If I limit the search to e.g 5000 it works fine (takes about 20-30 seconds), but without the limit it is using huge amounts of memory and takes many, many hours. Therefore, I would like to rewrite it to use paged results. I can't get it to work, though...

Your callback does not remove the entry from the list, so all entries are still being kept by the search result

sub process_entry { $jeje++ and print $jeje . "\n" }

sub callback {
    my ( $mesg, $entry) = @_;
    $jeje++ and print $jeje . "\n";
    $mesg->pop_entry;
}

Graham.

Reply via email to