Skip to content

Optimize removal of multiple tree nodes - #525

Open
SychicBoy wants to merge 1 commit into
dnSpyEx:masterfrom
SychicBoy:fix/issue-91-batch-tree-removal
Open

Optimize removal of multiple tree nodes#525
SychicBoy wants to merge 1 commit into
dnSpyEx:masterfrom
SychicBoy:fix/issue-91-batch-tree-removal

Conversation

@SychicBoy

Copy link
Copy Markdown

Link to issue(s) this pull request covers:

Fixes #91

Problem

Deleting a large number of selected tree nodes caused significant slowdowns because each individual removal triggered intermediate selection updates and related tree view processing.

This affected deleting large sets of nodes such as types, methods, fields, properties, events, and other members.

Solution

Added a bulk node removal operation to the tree view and updated the assembly editor deletion workflow to use it.

The new removal path calculates the final selection state once before removing the nodes, avoiding repeated intermediate selection updates while preserving existing node removal notifications, selection behavior, and restore/undo functionality.

Changes made:

  • Added a bulk node removal API to ITreeView.
  • Implemented batched removal handling in TreeViewImpl.
  • Updated DeletableNodes to use the new removal path.

Tested by deleting large selections containing:

  • types
  • methods
  • fields
  • properties
  • events

The deletion now completes without noticeable delay, and selection behavior remains correct after removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App stuck when deleting many types

1 participant