On Mon, Apr 14, 2008 at 5:53 AM, Stuart McCulloch
<[EMAIL PROTECTED]> wrote:
> On 14/04/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>  >
>  > Author: pauls
>  > Date: Sun Apr 13 12:10:39 2008
>  > New Revision: 647612
>  >
>  > URL: http://svn.apache.org/viewvc?rev=647612&view=rev
>  > Log:
>  > Cache filters and create an index for objectclass to improve service
>  > lookup performance.
>  >
>  > Modified:
>  >
>  >     
> felix/trunk/framework/src/main/java/org/apache/felix/framework/FilterImpl.java
>  >
>  >     
> felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java
>  >
>  > Modified:
>
> > felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java
>  > URL:
>  > 
> http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java?rev=647612&r1=647611&r2=647612&view=diff
>  >
>  > 
> ==============================================================================
>  > ---
>  > 
> felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java
>  > (original)
>  > +++
>  > 
> felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java
>  > Sun Apr 13 12:10:39 2008
>  > @@ -257,6 +257,11 @@
>  >          switch (kind)
>  >          {
>  >              case SIMPLE :
>  > +                if ("objectClass".equals(attr.toString()) && (op == '='))
>  > +                {
>  > +                    program.add(new ObjectClassOperator((String)
>  > pieces.get(0)));
>  > +                    return true;
>  > +                }
>  >                  // Code: Push(attr); Constant(pieces.get(0));
>  > <operator>();
>  >                  program.add(new PushOperator(attr.toString()));
>  >                  program.add(new ConstOperator(pieces.get(0)));
>
>
>  this is a little bit faster, as it short-circuits the check on other ops:
>
>    if ((op == '=') && "objectClass".equalsIgnoreCase(attr.toString()))
>
>  also I think it should be equalsIgnoreCase because the attribute is
>  case-insensitve? or is this normalized elsewhere to "objectClass"?

The change is in. Thanks :-)

regards,

Karl

>  --
>  Cheers, Stuart
>



-- 
Karl Pauls
[EMAIL PROTECTED]

Reply via email to