Closed hvelarde closed 9 years ago
This pull seems ok. I tested in a vanilla Plone running all tests again and with some manual testing. We will just try to do some stress tests to make sure it's the optimization we were looking for this specific problem.
please merge the pull request when you successfully finish your tests; also, feel free to change the memoizer in case you need one a little bit more aggressive.
I guess caching for a small amount of time like one minute, could be enough; you can use something like this:
from plone.memoize import ram
@ram.cache(lambda method, self, fullname: (time() // 60, fullname))
def _search_member_by_name(self, fullname):
...
This more agressive piece of code is safer in a LDAP context IMHO. If you wouldn't mind changing it, I will merge the pull request.
@hvelarde We can delete this branch after merging, right?
closes #128