Dale Visser <dale.vis...@live.com> added the comment:

FWIW, when I tried this instead, I got 21 to 22 msec per 1000 log messages 
(still a 5-10% performance hit):

def filter(self, record):
    rv = True
    if self.filters:
        rv = all(getattr(f, 'filter', f)(record) for f in self.filters)
    return rv

I don't see that getattr(...) should be less efficient than hasattr(...), so 
the generator expression is the likely culprit.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37101>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to