Re: Speedup canvas itemconfigure -fill for many polygons.
- From: max vorticity <max.vorticity@xxxxxxxxxxx>
- Date: Sun, 30 Mar 2008 13:18:20 -0700 (PDT)
On Mar 30, 3:46 pm, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
On Mar 30, 5:18 pm, max vorticity <max.vortic...@xxxxxxxxxxx> wrote:
[...] 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).
What exactly is slow with a tag ?
For example, if you do [.c itemconfigure all -fill red], is it slow ?
If not, then the next question is, can you afford to associate one tag
to each separate colour (assuming you can quantize them a bit), and do
the tag-juggling fast enough (is addtag/removetag slow ?) ?
-Alex
I had an error in my analysis so the slowness is not really
attributable to the itemconfigure command. So forget my original post
except that when using a lot of tags, it is much slower to address the
items by individual tags for each polygon than by the original canvas
id (using the all tag to change colors works with no noticable
delay). For instance, take a 2-d array of data and make a tag based
on the xy coordinate. Using a this tag to address the canvas item
instead of the canvas id was much slower. Addressing only a few items
by tags at a time in an interactive display is not really noticable.
However, if you need to change a very large number of items at once,
id's appears to be noticably faster. My application has over 80000
canvas items and I amazed at how well the canvas does.
.
- Follow-Ups:
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Alexandre Ferrieux
- Re: Speedup canvas itemconfigure -fill for many polygons.
- References:
- Speedup canvas itemconfigure -fill for many polygons.
- From: max vorticity
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Alexandre Ferrieux
- Speedup canvas itemconfigure -fill for many polygons.
- Prev by Date: Re: Tk_PkgInitStubsCheck - build error
- Next by Date: Tclhttpd: why not return the HTTP status from Direct_Url?
- Previous by thread: Re: Speedup canvas itemconfigure -fill for many polygons.
- Next by thread: Re: Speedup canvas itemconfigure -fill for many polygons.
- Index(es):
Relevant Pages
|