Speedup canvas itemconfigure -fill for many polygons.
- From: max vorticity <max.vorticity@xxxxxxxxxxx>
- Date: Sun, 30 Mar 2008 08:18:27 -0700 (PDT)
I'm displaying tens of thousands of polygons on a canvas and need to
change the fill color as the data associated with the polygon
updates. The time to change the color of the polygons can take 10's
of seconds. The data updates all at once for all polygons, so I
process all data in one loop, reconfiguring the fill color as
necessary. The time to step through all the data and determine the
color is at an acceptable performance level, but when I add the
itemconfigure command, it slows way down. I'm already using the canvas
id in the canvas itemconfigure command (using a tag is woefully
slow). Other canvas operations like scaling, scrolling,
itemconfigure all -fill {}, all work very well performance wise so for
everything else, the canvas doesn't seem to have a problem with number
of canvas items.
So does anyone have any suggestions on how I might speed up the
changing of the colors? I'm not much of a C coder but if it is pretty
straight forward, I'd take a crack at C solution, although tcl would
be much preferred. I'm using latest versions of ActiveTcl 8.4/8.5 (Tk
seems slower on 8.5) on Linux.
.
- Follow-Ups:
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Alexandre Ferrieux
- Re: Speedup canvas itemconfigure -fill for many polygons.
- Prev by Date: How to find this pattern by regular expression?
- Next by Date: finding tk version in Matrix 10.6
- Previous by thread: How to find this pattern by regular expression?
- Next by thread: Re: Speedup canvas itemconfigure -fill for many polygons.
- Index(es):
Relevant Pages
|