[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

E. Paine report at bugs.python.org
Tue Aug 25 09:29:34 EDT 2020


E. Paine <paineelisha at gmail.com> added the comment:

I am struggling to reproduce. On Linux the window shows exactly as expected (it does take a while to close, though, which is understandable) and on Windows the window never shows (it gets stuck before the mainloop). This is, however, not a tkinter problem as I get exactly the same result on each platform running the following equivalent Tcl in Wish:

for {set i 0} {$i < 10000} {incr i} {
    ttk::label ".l$i" -text problematic
}
grid [ttk::label .lb -text {now you see me}]

A similar issue was reported in #37673. If you *need* lots of widgets (e.g. a large table) I would suggest lazy loading them instead of trying to render them all at load. Thank you for reporting this issue but it should be closed as third-party.

A note for future: please could you include information about your environment (Python version, Tk patchlevel, OS, etc.) so it is easier for the problem to be narrowed down (again, thank you for reporting this issue).

----------
nosy: +epaine
Added file: https://bugs.python.org/file49427/ten_k.tcl

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41632>
_______________________________________


More information about the Python-bugs-list mailing list