[Twisted-Python] log.callWithLogger not used - slows down reactor?

Barry Scott barry.scott at forcepoint.com
Tue Jun 2 05:54:34 MDT 2020


I'm hunting down performance issue in our code and spotted this in
passing. As far I can tell nothing seems to need callWithLogger.

I ran our 6k+ tests with this patch applied and everything worked.

Does anything in the twisted world need it?

Barry

diff --git a/src/twisted/internet/pollreactor.py b/src/twisted/internet/
pollreactor.py
index 6db1660b9..6901e5c95 100644
--- a/src/twisted/internet/pollreactor.py
+++ b/src/twisted/internet/pollreactor.py
@@ -165,7 +165,7 @@ class PollReactor(posixbase.PosixReactorBase, 
posixbase._PollLikeMixin):
                 # Handles the infrequent case where one selectable's
                 # handler disconnects another.
                 continue
-            log.callWithLogger(selectable, _drdw, selectable, fd, event)
+            _drdw(selectable, fd, event)
 
     doIteration = doPoll
 






More information about the Twisted-Python mailing list