Updating Label text #1925
-
I'm looking to speed up how fast all the labels are updated, since its taking almost 10 seconds. Granted, I have 96 labels on this window, but when I tried to build the same app in Kivy, the labels updated instantly. My function 'calculate' has two parts to it
I'm 100% certain that its the labels.text being set that is taking a lot of time, seems to be 10 labels per second is the rate. Would anyone know of a method/pattern/improvement I could do? I believe its the searching for key:value pair in the dict that is the time waster. Here is a snippet of the first 20 or so lines of my calculate function:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
What platform are you running this code on? I've just mocked up an example on macOS, and 100 labels update in <0.1 s; my guess is that this is a performance issue on one specific platform. |
Beta Was this translation helpful? Give feedback.
briefcase run
vsbriefcase dev
vspython -m
won't make any difference in this case - they're functionally exactly the same. There's only some minor variations in how the Python interpreter is started.I'd be very surprised if it's dictionary lookup that is the slow…