On Mon, 2007-12-17 at 15:11 +0100, Didi wrote:
> I am trying to generate my /etc/passwd from my ldap as a backup
> solution. For this I wrote a little script. Unfortunately with having
> 20530 users in my LDAP (expected to increase) the script takes

20k?  Tiny!

If you're using Net::LDAP, then investigate the
Net::LDAP::Control::Paged module.  This will let you get the results in
more manageable chunks.  Overall this actually increases the amount of
queries and loops you do, but with the right page size you can get good
performance while keeping Perl's in-memory size far lower.


Reply via email to