Replacing geometry objects and latency in shaded mode

I am writting a c# plugin where the user adjusts several parameters using sliders on a WinForms window. The plugin creates several geometry objects (curves, breps, etc) and adds the to the active document. When the user re-adjusts the parameters (through the GUI sliders), if the objects already exist in the active document, they are replaced using the doc.Objects.Replace method.

When the viewport is in wireframe mode everything works fine and the experience is very smooth. When the viewport is in shaded or any other mode (Render, etc) there is significant lag. Is there a method to avoid this latency and perform a smooth and fast geometry replacement/change as user uses the GUI sliders (or textbox) as it is with grasshopper preview? Is it mandatory to use a display conduit to achieve such result?

Hi @vassilisstratis,

Rather than replacing the document object every time you move a slider, you should draw intermediate results using a display conduit.

– Dale