in reply to Re^2: Optimize my code with Hashes
in thread Optimize my code with Hashes

6s is quite slow. One question: Do you setup a new LDAP connection for each transaction? If yes, try to reuse an already opened LDAP connection (better: a pool of connections) since it is not necessary to bind and authenticate 50k times.