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

Consider slowing down refresh speed on explorer window #1351

Closed
bwateratmsft opened this issue Oct 21, 2019 · 9 comments · Fixed by #1352
Closed

Consider slowing down refresh speed on explorer window #1351

bwateratmsft opened this issue Oct 21, 2019 · 9 comments · Fixed by #1352
Milestone

Comments

@bwateratmsft
Copy link
Collaborator

Related to #1292 , #1225.

@philliphoff @BigMorty @EricJizbaMSFT @StephenWeatherford @fiveisprime How would you guys feel about slowing down the explorer window's refresh rate from the current 1 second to something longer? Two? Three? Five?

@BigMorty
Copy link
Member

Is there a reason for needing to slow down the refresh rate? I would prefer we keep it at 1 second so it is as accurate as possible. If there is a tech/perf reason I would think going to 2 seconds would still be acceptable.

@bwateratmsft
Copy link
Collaborator Author

Mainly, CPU usage: #1225 , and significant DNS traffic: #1292.

We can't control either of those problems but we can slow down the default refresh rate. Anybody who needs it to be faster can always speed it up.

@BigMorty
Copy link
Member

Thanks for the more info on this. I think changing the default to be 2 or 3 seconds seems reasonable. #1225 also mentioned stopping the auto-refresh when not in focus, is that something we can do as well? @luboms

@bwateratmsft
Copy link
Collaborator Author

bwateratmsft commented Oct 21, 2019

stopping the auto-refresh when not in focus, is that something we can do as well?

Yes, planning to: #1352

@BigMorty
Copy link
Member

Great! 👍

@karolz-ms
Copy link
Contributor

My 2 cents: we should make the refresh rate a configuration parameter, incl. allowing auto-refresh to be turned off (there is option to manually refresh already).

@ejizba
Copy link
Contributor

ejizba commented Oct 21, 2019

@karolz-ms there's already a setting docker.explorerRefreshInterval

Regarding the motivation of this issue, another mitigation could be to collapse the network/volume explorers by default. I bet plenty of people leave those open, causing us to poll on them, but only actually use the containers/images explorers. Unfortunately, not sure if VS Code lets us specify a default expanded/collapsed state

@philliphoff
Copy link
Member

We might also consider switching to a "push" model rather than a "pull/poll" model. We do this for CTW in VS where the containers/images trees are refreshed only when relevant events are reported by Docker, rather than on any specific polling interval. (The refresh is further throttled so that refresh only happens x number of milleseconds after no more relevant events have been received.) This may not work for all nodes in the tree, but it might reduce the total number of calls to Docker that need to be made during a refresh.

@bwateratmsft
Copy link
Collaborator Author

Dockerode does support this with the getEvents method. It returns JSON that could probably tell us which section to refresh, or let us avoid refreshing entirely if we want to get more advanced.

@bwateratmsft bwateratmsft removed their assignment Oct 22, 2019
@BigMorty BigMorty modified the milestones: 0.9.0, 0.8.2 Oct 23, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants