Message 1 of 7
Python attributes.add poor performance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
In my python extension I need to add an attribute to a fairly large number of sketchPoints and sketchLines.
For this I use the following code:
@timed
def tag(elements, finger_id, master=False):
if not finger_id:
return
info("Tagging {} elements", len(elements))
value = 'M' if master else 'C'
for element in elements:
element.attributes.add(ATTRIBUTE_GROUP, finger_id, value)
This is very slow, e.g. tagging 230 elements this way takes 150 seconds!
Any suggestion on how to do this faster ?
Thanks,
Philip