[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Possible optimization
On Wed, Dec 01, 1999 at 06:07:08PM +0100, bert hubert wrote:
> Hi,
>
> some of you may have seen my previous posting regarding failing substring
> searches. In researching this, I came across the following output:
(..)
> Now, it appears to me that once you have found *1* candidate, it must be it,
> and further index_read()ing can stop.
This is against the stock OpenLDAP 1.2.7:
--- filterindex.c Tue Jul 20 02:17:25 1999
+++ filterindex.c.new Wed Dec 1 19:38:16 1999
@@ -350,6 +350,14 @@
if( idl == NULL ) {
break;
}
+ /* if we're down to a single match, stop searching */
+ if(ID_BLOCK_NIDS(idl)==1)
+ {
+ Debug( LDAP_DEBUG_TRACE, "down to one match, stopped search\n",
+ 0, 0, 0 );
+ break;
+ }
+
}
Debug( LDAP_DEBUG_TRACE, "<= substring_comp_candidates %lu\n",
=======
It works very well for me. Any comments are appreciated.
Regards,
bert hubert.
--
+---------------+ | http://www.rent-a-nerd.nl
| nerd for hire | |
+---------------+ | - U N I X -
| | Inspice et cautus eris - D11T'95