Efficient Selection of Custom Object

I’m trying to find an efficient way to select all instances of my plugin’s CustomCurveObject in a RhinoDoc. Currently I’m doing something like this:

List<Guid> customObjectIds = MyPlugin.CustomObjectIds; // This is already computed
RhinoDoc.ActiveDoc.Objects.Select(customObjectIds); // This is slow

This takes several seconds to execute. However, the “SelCrv” command (which also selects my custom object, since it is a curve) executes almost instantly.

Is there a better way to do this? How is the “SelCrv” command able to select all objects of a given type so quickly?

Nevermind… This was my fault. Looks like I was subscribing to RhinoDoc.SelectObjects, and performing some additional work when that object was MyCustomCurveObject.