Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 03:14:46 -0700 (PDT)
On Mar 31, 11:45 am, Mats <mats...@xxxxxxxxx> wrote:
Creating a new mapping item -> tagList then involves adding the item
to each tag hash entry. Removing a mapping item -> tagList would then
involve looking up the item and removing it for each tag hash entry.
This is a linear search which isn't good.
Oh, OK, I had not deciphered that part of the question ;-)
Well, to answer this one I'd add a third hashtable mapping (tag,item)-
position-in-list. Granted, that means additional housekeeping, butall operations then are O(1).
-Alex
.
- Follow-Ups:
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Mats
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Donal K. Fellows
- 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
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: max vorticity
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Alexandre Ferrieux
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Mats
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Alexandre Ferrieux
- Re: Speedup canvas itemconfigure -fill for many polygons.
- From: Mats
- Speedup canvas itemconfigure -fill for many polygons.
- Prev by Date: Re: Update using teacup
- Next by Date: Re: Speedup canvas itemconfigure -fill for many polygons.
- 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
|