Skip to content

TreeDataProvider is called even if view is not visible #39340

Closed

Description

  • 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.

Activity

  1. added
    bug
    on Nov 29, 2017
  2. added
    tree-widget
    tree-views
    important
    and removed
    tree-widget
    on Nov 29, 2017
  3. added a commit that references this issue on Dec 3, 2017
  4. locked and limited conversation to collaborators on Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugimportantperftree-viewsverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions