Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeDataProvider is called even if view is not visible #39340

Closed
weinand opened this issue Nov 29, 2017 · 0 comments
Closed

TreeDataProvider is called even if view is not visible #39340

weinand opened this issue Nov 29, 2017 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority perf tree-views Extension tree view issues verified Verification succeeded
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Nov 29, 2017

  • create an extension that contributes a TreeView
  • create a TreeDataProvider that fires _onDidChangeTreeData(undefined) events every 2 seconds
  • run the extension
  • collapse the TreeView to make it invisible

Observe:

  • TreeDataProvider.getChildren is called even if view is insible

I would expect that TreeDataProvider.getChildren is only called if the view is (or becomes) visible.
If this cannot be achieved we need an new event that tells us when the view is not visible so that we can stop firing _onDidChangeTreeData.

Without this it is not possible to have a view that consumes no cpu cycles when not being visible.

@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Nov 29, 2017
@weinand weinand added tree-widget Tree widget issues tree-views Extension tree view issues important Issue identified as high-priority and removed tree-widget Tree widget issues labels Nov 29, 2017
@bpasero bpasero added the perf label Nov 30, 2017
@sandy081 sandy081 added this to the November 2017 milestone Nov 30, 2017
sandy081 added a commit that referenced this issue Dec 3, 2017
@sandy081 sandy081 closed this as completed Dec 3, 2017
afonsobspinto pushed a commit to afonsobspinto/vscode that referenced this issue Dec 3, 2017
afonsobspinto added a commit to afonsobspinto/vscode that referenced this issue Dec 5, 2017
This reverts commit 101f7a0.
@weinand weinand added the verified Verification succeeded label Dec 5, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority perf tree-views Extension tree view issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants