[python-ldap] Performance improvement for schema.tokenizer.split_tokens

Christian Heimes christian at python.org
Mon Feb 20 04:59:38 EST 2017


On 2017-02-18 18:39, Michael Ströder wrote:
> Michael Ströder wrote:
>> I see you're coming close to my own (non-published) attempts of working around some
>> schema bugs. But is it still that much faster then? ;-)
> 
> Overall schema parsing done in ldap.schema.SubSchema.__init__() is twice as fast with
> your recent implementation. That's great!
> 
> Ciao, Michael.

Hi,

here is a patch against latest CVS head including some additional test
cases. I changed the regular expression to handle backslash quoting of
single quotes within single quotes. A co-worker also noticed that my
implementation did not check for closing parenthesis before opening
parenthesis. I added a check for the special case, too (thx Standa).

-----
The attached patch file is derived from python-ldap module. All of the
modifications to python-ldap module represented in the following
patch(es) were developed by Christian Heimes <christian at python.org>. I
have not assigned rights and/or interest in this work to any party.
-----

Regards,
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast_split_tokens.patch
Type: text/x-patch
Size: 6558 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20170220/afcc866b/attachment.bin>


More information about the python-ldap mailing list