I am using C++ to write a CPG plugin. There are tens of thousands of overlapping objects that need to be grouped. The C++ algorithm runs very quickly, in less than 0.25 seconds. However, when using ShapeRange.Group in CorelDRAW to group 2,000 objects, it takes 30 seconds. How can I solve the software bottleneck?
// =================================
My algorithm hasn't changed, I just took a detour. Previously, I would group the shapes in one step using srgp.Group().
Now, I first get the bounding box of the srgp, then use the bounding box to select the shapes, and then group them.
However, I'm not sure why ShapeRange->Group() is so slow. It could be a bug in CorelDRAW.