Hi Arthur,<br><br><div class="gmail_quote">On 09/19/2012 6:19 PM, Arthur Schiwon wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><pre>Hi again,
On 09/19/2012 02:25 AM, Manuel Delgado wrote:
><i> I think the problem is not in the ldap but in the greedy
</i>><i> (foreach/recursive) search in ldap2ownCloudNames method.
</i>
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</pre><br>
</blockquote></div><br>I made the tests with my changes and your patches. It's simply <span id="result_box" class="short_text" lang="en"><span class="hps">miraculous</span></span>:<br><div style="margin-left:40px">$ time php /srv/sites/owncloud/cron.php<br>
<br>My changes:<br><div style="margin-left:40px">real 235m2.634s<br>user 229m51.470s<br>sys 0m14.533s<br></div><br>Patch A (prepared statement)<br><div style="margin-left:40px">real 3m3.474s<br>user 0m12.065s<br>
sys 0m12.689s<br></div><br>Patch B ($arr[$dn])<br><div style="margin-left:40px">real 3m36.445s<br>user 0m16.833s<br>sys 0m12.661s<br></div></div><br>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.<br>
<br>Thanks a lot!<br><br clear="all">Manuel Delgado<br><br>-----------------------------------------------------------<br><b>Usuario Linux</b> <i>#<a href="http://counter.li.org/" target="_blank">520940</a></i> <br><br>Bach. Computación e Informática<br>
Universidad de Costa Rica<br>