Skip to content

Optimize tree view such that cross process calls are batched #232263

@alexr00

Description

@alexr00

In the async data tree, updateChildren will update the children of any node passed in, even if that node is far, far off screen.

For the extension tree view, this can result in slowness. Consider the following case:

  • Extension contributes a giant tree, with hundreds of thousands of elements at the top level, all expanded
  • For each of these elements, we will call updateChildren
  • This causes hundreds of thousands of round trip calls to the extension host to get the children of each of these top level elements
  • In reality, we only need to get the children of the visible elements

A better solution would be to do the updateChildren for the visible elements, and for elements who have a visible child, and simply mark the out-of-view elements as needing to have their children updated once they scroll into view.

Found while fixing #230361

Metadata

Metadata

Assignees

Labels

debtCode quality issuesinsiders-releasedPatch has been released in VS Code Insiderson-testplanpolishCleanup and polish issuetree-viewsExtension tree view issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions