Comments

When deleting hundreds of objects there is a significant pause (when it's a thousand objects, Tiled even hangs for a long time). Undoing and redoing this action is fast however. It is strange that the initial action takes so long, so this should be investigated.

This comment has been minimized.

It is strange that the initial action takes so long, so this should be investigated.

This is because it only happens when the objects that are being removed are selected.

The problem is that each object is removed individually, which causes a change to the set of selected objects, and in response to each such change a lot of code is executed in the Objects view (synchronizing the selection) and the main map view (like recomputing resize handle positions).

So a possible fix is to explicitly deselect all objects that are going to be removed first, such that there is only one change to the selection. But that does not work when the change is later redone after the objects are selected again. The real fix probably requires the use of a single undo command that can remove / restore multiple objects.