directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@gmail.com>
Subject Fast openldap schema parser : completed
Date Wed, 16 May 2018 08:25:42 GMT
Hi !

I finally committed the new parser. I did my best to have the same API, 
so ou can use it as if it were the previous version, except that it does 
not use AntLR anymore.

The final performance results :

new parser, core schema parsed 100 000 times : 31s
old parser, core schema parsed  10 000 times : 100s

ratio : 32 times faster (it's a bit slower than what I said in my 
previous mails, but I have added various checks that slow down the 
parser - mainly checks on OID validity -.


Radovan, you are free to check with your various LDAP server if the code 
is ok for you, and if not, I'm ready to fix it.

Side notes :
- I'm now using static methods for the various schema parsers, so there 
is no synchronization anymore
- I found *many* errors in the previous implementation...
- the Strict mode is not as strict as it could be : we typically accept 
OID macros (that allows us to have things like "attributeType ( 
MyRootOid:2.3.4 ...)" to be used, where 'MyRootOid' is defined using a 
ObjectIdentifier element. This is ultra convenientt, and does not put us 
at risk.
- The code has been pushed in the API 2.0 branch.

I haven't yet tested Studio with this new code, this is soemthing I'll 
do soon.

Hope you'll find that convenient !
-- 
Emmanuel Lecharny

Symas.com
directory.apache.org


Mime
View raw message