When selecting a large number of objects using the Doc.Objects.Select(Guids) method, a separate SelectObject event gets fired for each Guid, and the properties window massively slows things down (for example 1761 items consistently take more than 9000 milliseconds to redraw). For the current deployment of a plug-in, I am using the approach proposed in the linked thread…however, this solution is definitely suboptimal, as it will reorder the properties window on the docked panel stack. It’d be nice if Doc.Objects.Select with multiple Ids were able to suppress the SelectObject event firing for every item, and instead be saved for after the last item has been selected.
Hi Dave,
I believe we have already fixed this issue for V6. Most of the panels now simply set a dirty flag when events are fired and the panel is later updated during an Idle event if the dirty flag has been set.
Hi again. So we’re updating a plug-in for a client for Rhino 6, and I am finding that Doc.Objects.Select(guids) remains painfully slow when the Properties window is visible. Although it now doesn’t fire a Selection event for each object, it seems like there’s an exponential increase in completion time for the selection, depending on the number of Guids supplied to the method. For this reason I am guessing that when it is visible, the Properties window is being re-evaluated incrementally for each object selected, so object 1 is considered alone, o2 is compared against o1 and a bit slower, o3 compared against 02 and 01, slower still, etc.
The previous workaround I was using still applies, and is still not optimal…any chance that this might be addressed?
Ah, yes it must be. I thought it wasn’t firing every time, but I was suppressing my own internal selection event listener until the undo/redo finished up. Hope it gets sorted!
@dave_stasiuk a workaround for you might be to use the SelCommand base class if you’re able to (assuming you just want to select a bunch of stuff). It’s the base class that commands like SelAll are derived from.
@dave_stasiuk Interesting… SelCommand shouldn’t fire multiple selection events. I made a quick sample for you to test. using a SelStuff test command. SelStuff should just highlight anything on the Default layer when you run it. I also made a video of how its working on my own machine. See if your selelected objects event fires more than once after running the selstuff command.