E. Paine <paineeli...@gmail.com> added the comment:
This *appears* to be a Tk issue. I ran a benchmark (see attached) which repeatedly performed canvas actions. The first test ("clearing") clears the canvas, creates a rectangle, then calls both `update` and `update_idletasks`. The second test ("not clearing") is the same as the above but did not clear the canvas (causing rectangles to be drawn over each other). Here is a table of the results (times are per iteration in milliseconds): +------------+-------------------------+-------------------------+ | Tk Version | Python | Wish | | +----------+--------------+----------+--------------+ | | clearing | not clearing | clearing | not clearing | +============+==========+==============+==========+==============+ | 8.6.8 | 6.6 | 41.4 | 4.2 | 16.2 | +------------+----------+--------------+----------+--------------+ | 8.6.11 | 37.0 | 37.1 | 36.1 | 36.1 | +------------+----------+--------------+----------+--------------+ A few notes: - These were performed on a slow machine and results could be influenced by background CPU usage fluctuations - Because it is a slow computer, I limited the iterations to just 1000 per test. - Python version was 3.9.2 - Wish 8.6.8 was installed using an ActiveTcl binary whereas 8.6.11 was installed through homebrew ---------- Added file: https://bugs.python.org/file49905/tkbench.zip _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43511> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com