Re: Speedup canvas itemconfigure -fill for many polygons.



Alexandre Ferrieux wrote:
Well, to answer this one I'd add a third hashtable mapping (tag,item)->
position-in-list. Granted, that means additional housekeeping, but
all operations then are O(1).

With these sorts of things, the difficulties relate to whether the
additional housekeeping costs are justified by having some operations be
O(1) instead of O(n). That can be a tough call. (Measure before commit,
and watch out for what you're measuring against; making common stuff
quite a bit slower for a speedup in rare cases might not be a good
tradeoff after all...)

Donal (the core's full of this sort of thing).
.