Ruby/ActiveLDAP parses LDAP schemas provided by the server in order to determine what attributes are available for a particular object and how they should be treated. This is being done primarily with the regular expressions built-in to Ruby/LDAP. Turns out, this is pretty damn slow. When trying to speed up RAL, I wrote this simple patch.
In essence, it implements parsing of the BNF syntaxes supplied in RFC 2252. It
works quite well with the OpenLDAP schemas I tested, but it doesn’t yet support
UTF-8 as the RFC specifies. Since there doesn’t appear to be much interest in
this parser, I haven’t taken then time to add this, but I believe that this
could be added quite easily by checking byte width of each token in the
parse function. If you are looking for a LDAPv3 schema parser and
you’d be interest in having me clean this up, feel free to drop me a line.