Conduit performance [SOLVED]


Hi, I’am planning to implement in a plugin the possibility to preview Points3d geometry on scene.
My plan is to use display conduit, as I presumed that its a more neat way to work with geometry that has only the mission of giving visual feedback to the user.
so far, I had succesfully represent a pointcloud geometry overriding PreDrawObject event handler, but display performance is very poor (drawing points instead of pointcloud is much worse). With a bunch of points, performance is fluid but it gets worse and worse. I understand that my plugin is trying to redraw the pointcloud on each new frame, because i’am using DisplayConduit, and this is a lot of work.
So I guess if there is a more efficient manner to preview geometry on scene (maximum 5 thousand of points or maybe arrows), in a way that user can still pan or orbit over.

to be sure that my code is not doing nothing wrong, I paste here the implementation of displayConduit thing.

      protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
        e.IncludeBoundingBox(bbox);     //bbox defined previously      
    protected override void PreDrawObject(DrawObjectEventArgs e)  // here just Draw calcullation, //but still very slow!!
        var vp = e.Display.Viewport;
        e.Display.DrawPointCloud(this.ptCloud, 10, System.Drawing.Color.Green);


ok, I saw the problem! PreDrawObjects is much faster than PreDrawObject, which (now) makes so much sense to me :smile: ! I guess that I was calling the eventhandler before EACH object of the scene was drawn.