Skip to content

DrawingControl3D slow Selection #231

@PaulMora93

Description

@PaulMora93

Hi xBIM team,

I'm working with DrawingControl3D to visualize IFC models and I'm experiencing a performance issue when assigning multiple elements to the Selection property.

My code selects around 292 visible elements (IIfcProduct) and assigns them as follows:

var selection = new EntitySelection(false);
selection.AddRange(selectedItems); // ~292 items
DrawingControl.Selection = selection;

The line DrawingControl.Selection = selection; is the main performance bottleneck.
Even after using optimizations like BeginInit(), HighSpeed = true, and EndInit(), it still takes a noticeable amount of time — which seems excessive for only ~300 items.

I’ve ensured that hidden elements are filtered out, and I also tried applying ModelOpacity = 0.1 and Zoom(), but the delay clearly happens during the Selection assignment.

Is there any recommended way to optimize multi-element selection?
Could it be that the control is triggering a redraw or event per entity added to the selection?

Thanks in advance.

Best regards,
Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions