Terry J. Reedy added the comment: Speed tests: First -- raw loops/second. The attached loopspeed.py has code for tk and asyncio that is equivalent as I know how. The tkasync loop is for the asyncio loop with a root.update() call added, where the root is a fresh instance of Tk(). (Reusing the old root resulted in the tk loop restarting.) tcl/tk loop: 13300 l/s asyncio loop: 14900 l/s tkasync loop: 10900 l/s (uncomment commented lines) The two bare loops have a std.dev. of roughly around 100, with +- up to 300. This suggests to me that the tcl loop might be written in tcl, not C. This result reduces my motivation to write a tcl/tk based replacement for BaseEventLoop, thought I still might.
Second -- IDLE syntax highlighting speed. I opened 9 idlelib files in installed 3.6.0a3 and patched repository 3.6.0a3+. I switched between a light default and custom custom theme and hit apply. For stock IDLE, it took 2 subjective mental 'thousand and one...' counts. For patched IDLE, three. Reducing the call_later delay from .01 to .001 reduced the count to about two and a half. Replacing call_later with call_soon may have given a small further speedup. Changing highlight theme (or changing font or font size, which trigger re-highlighting) with at least a few thousand lines of code to process, is sufficiently rare that a slowdown of 25% or less does not bother me. When I want to try to experiment with using asyncio with IDLE, I will use the current patch until it proves not to work. I am now thinking of this as perhaps just a doc issue. ---------- Added file: http://bugs.python.org/file43849/loopspeed.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27546> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com