develooper Front page | perl.ldap | Postings from August 2017

Searching without retaining all results

Thread Next
From:
Chris Ridd
Date:
August 3, 2017 15:59
Subject:
Searching without retaining all results
Message ID:
ACFFDA23-167B-44A4-8B29-9064BB53C7E9@mac.com
I had a requirement to extract 30+ million entries from an ldap server, and naively thought that using callbacks would be useful.

While they are useful in getting me each result quickly, I didn't realise that Search still captures each result in self. So after reading several million entries Linux's oom killer kindly killed a) the ldap server and then b) my script to try and get back some memory!

I ended up patching Search.pm to avoid capturing each result when using callbacks. Is there a better way to do this?

Cheers,

Chris
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About