Jul-20-2020, 06:25 PM
When I ran this code the canvas update takes 0.14 seconds. I shaved a whole 3% off by using Canvas.itemconfig to set the rectangle color instead of deleting all the rectangles and making a new grid. Tkinter is doggy doing normal things and this is not the kind of thing it is meant to do. Those rectangles are all objects, not just a drawing on the canvas. This is not much different than drawing a panel with 3600 buttons then delete. Repeat.
Have you thought about doing whatever it is you are trying to do using PyGame? PyGame should be faster at drawing.
Have you thought about doing whatever it is you are trying to do using PyGame? PyGame should be faster at drawing.