Edit report at http://pear.php.net/bugs/bug.php?id=18752&edit=1
ID: 18752
Updated by: [email protected]
Reported By: xavier dot montagutelli at unilim dot fr
Summary: Performance problem retrieving search result + patch
-Status: Verified
+Status: Closed
Type: Feature/Change Request
Package: Net_LDAP2
Operating System: GNU/Linux Debian
Package Version: 2.0.11
PHP Version: 5.3.0
Assigned To: beni
Roadmap Versions:
New Comment:
-Status: Verified
+Status: Closed
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Hello again, thanks for your help!
I implemented both patches now, so the code should run faster.
Previous Comments:
------------------------------------------------------------------------
[2011-08-24 14:01:49] montagut
Your patch is not correct, it misses the underscore in the
"count_entries" variable.
Once corrected with the patch missingUnderscoreForCountCache, it works
better. Here are the numbers :
# php liste-net-ldap2.php
1. Using PHP native LDAP functions
Number of entries : 22407
Search time : 2 seconds
Building list from search result : 0 seconds
2. Using Net_LDAP2 object
Number of entries : 22407
Search time : 2 seconds
Building list from search result : 8 seconds
Net_LDAP2 is always much slower than the native LDAP functions, but we
have reduced the difference (from 15 s to 8 s).
But, why do you want to maintain the call to the "count" method at the
beginning of "shiftEntry" ? My first patch could be improved by testing
the result of ldap_first_entry to get rid of this call. If there are no
result, it returns false. So the call to "count" is useless.
Both patches could be inserted, as they serve different purposes in
fact.
------------------------------------------------------------------------
[2011-08-24 13:51:19] montagut
Added #patch
bug:18752;patch:missingUnderscoreForCountCache;revision:1314190279;.
------------------------------------------------------------------------
[2011-08-24 08:42:12] beni
Its in SVN now. Please test.
------------------------------------------------------------------------
[2011-08-24 07:48:29] beni
Added #patch
bug:18752;patch:Search.php_addCountCache.patch;revision:1314168509;.
------------------------------------------------------------------------
[2011-08-24 07:46:07] beni
ok, it looks like the pear svn is down currently, so the fix is not in.
i will add it as patch un til i can commit the change.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=18752
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18752&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.