Hi,

On Monday, 17. December 2007, 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
> real    0m21.471s
> to execute and uses up to 370 MB of Memory. (While using 100 % Percent
> of one Core (AMD Athlon(tm) 64 X2 Dual Core Processor 4600+))
>
> Has someone got an idea how I can make this a little more efficient. I
> tried both
> - foreach my $entry ($mesg->entries) {
> - while (my $entry=$mesg->pop_entry ( )){
>
> It seams like the search first fills it's buffer and then proceeds.
That's the regular wordking mode of Net::LDAP's search() method:
collect all entries, including the result from the server and
return.

You might try the asynchronous mode that uses callbacks.
See CALLBACKS in the man pages for that.

Regards
Peter

-- 
Peter Marschall
[EMAIL PROTECTED]

Reply via email to