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

[plugin] Save tree nodes to cache and fetch the nodes if they were changed #6007

Open
vinokurig opened this issue Aug 21, 2019 · 3 comments
Open
Labels
enhancement issues that are enhancements to current functionality - nice to haves performance issues related to performance plug-in system issues related to the plug-in system tree issues related to the tree (ex: tree widget)

Comments

@vinokurig
Copy link
Contributor

Description

Currently the tree plugin API always requests tree nodes from the plugin side. We need to store the tree nodes in a cache once they were fetched and return only cached nodes. Cache must be updated by the plugin event. This will increase the tree performance.

Reproduction Steps

  1. clone and compile https://github.com/microsoft/vscode-extension-samples/tree/master/tree-view-sample
  2. Start the hosted plugin, open the tree view.
  3. Expand and collapse the same tree node.

Children request is sent on each expand : https://github.com/theia-ide/theia/blob/7406add2a60106eaeba41a9b117d16e90c380764/packages/plugin-ext/src/plugin/tree/tree-views.ts#L91
OS and Theia version:

Diagnostics:

@vinokurig vinokurig added enhancement issues that are enhancements to current functionality - nice to haves performance issues related to performance tree issues related to the tree (ex: tree widget) plug-in system issues related to the plug-in system labels Aug 21, 2019
@akosyakov
Copy link
Member

akosyakov commented Aug 21, 2019

@vinokurig Do you experience perf issues somewhere to introduce optimization complexity? It would be good to justify it first, i.e. with reproducible example.

@akosyakov akosyakov added the 🤔 needs more info issues that require more info from the author label Aug 21, 2019
@vinokurig
Copy link
Contributor Author

It is actual for vscode github-pull-request plugin. The plugin sends requests to GitHub on each pull-request node click, even if it was opened earlier, while in vscode the nodes are requested from cache.

@akosyakov akosyakov removed the 🤔 needs more info issues that require more info from the author label Aug 21, 2019
@vinokurig
Copy link
Contributor Author

This impacts on the tree commands as well:
In the vscode tree command is registered only when the tree node is fetched so they can refresh the commands map on the refresh tree request. In Theia tree nodes are always requested by the tree, so the commands map is refreshed on the children request to not to overload the commands map. See #5961 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves performance issues related to performance plug-in system issues related to the plug-in system tree issues related to the tree (ex: tree widget)
Projects
None yet
Development

No branches or pull requests

2 participants