You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now CollectionIndexer and CollectionFeature are used for fancy indexing of Graphics in a GraphicCollection, such as LineCollection. However I have found that this indexing, since we're using lists and for loops a lot, becomes very slow with thousands of world objects.
# very slow, 16 seconds to change 1,000forgincontours[ixs_visible].graphics:
ifnotg.visible:
g.visible=Trueforgincontours[ixs_hide].graphics:
ifg.visible:
g.visible=False
However if we just use a numpy array of graphics instead of a tuple then it is MUCH faster:
# very fast, 10 ms to change 1,000 on an RX 470forgincontours.graphics[ixs_visible]:
ifnotg.visible:
g.visible=Trueforgincontours.graphics[ixs_hide]:
ifg.visible:
g.visible=False
Could create a new class that uses numpy array of Graphics to parse feature changes etc., basically have CollectionIndexer use the numpy array of graphics.