Hi Arthur, On 09/19/2012 6:19 PM, Arthur Schiwon wrote:
> Hi again, > > On 09/19/2012 02:25 AM, Manuel Delgado wrote: > >* I think the problem is not in the ldap but in the greedy*>* > >(foreach/recursive) search in ldap2ownCloudNames method.* > I have two other approaches which work around the recursive array > search. One is simple improving the result array from mappedComponents > so that a simple $arr[$dn] will give the owncloud name, if set. > > The other does DB queries using a prepared statement (i.e. i hope MDB2 > does prepared statements) on request. > > Both changesets (each against access.php from git master) are attached. > Could you please test if they speed it up noticeably, and if so which > does it better? > > Cheers > Arthur > > > I made the tests with my changes and your patches. It's simply miraculous: $ time php /srv/sites/owncloud/cron.php My changes: real 235m2.634s user 229m51.470s sys 0m14.533s Patch A (prepared statement) real 3m3.474s user 0m12.065s sys 0m12.689s Patch B ($arr[$dn]) real 3m36.445s user 0m16.833s sys 0m12.661s The idea of the prepared statement and the unidimensional array worked perfectly. I will be doing more test and reports if found something, but it's working great with 110k ldap users. Thanks a lot! Manuel Delgado ----------------------------------------------------------- *Usuario Linux* *#520940 <http://counter.li.org/>* Bach. Computación e Informática Universidad de Costa Rica
_______________________________________________ Owncloud mailing list Owncloud@kde.org https://mail.kde.org/mailman/listinfo/owncloud