Skip to content

Fixes #91913 : Exclude **/.hg/store/** from the file watcher#91941

Merged
bpasero merged 1 commit intomicrosoft:masterfrom
Yoric:master
Mar 9, 2020
Merged

Fixes #91913 : Exclude **/.hg/store/** from the file watcher#91941
bpasero merged 1 commit intomicrosoft:masterfrom
Yoric:master

Conversation

@Yoric
Copy link
Contributor

@Yoric Yoric commented Mar 3, 2020

Watching these files can cause several hours of 200% CPU after even
trivial hg operations (numbers based on local testing). Excluding
these files seems to bring down the duration to a few seconds.

This PR fixes #91913

Watching these files can cause several hours of 200% CPU after even
trivial `hg` operations (numbers based on local testing). Excluding
these files seems to bring down the duration to a few seconds.
@bpasero
Copy link
Member

bpasero commented Mar 3, 2020

@Yoric I am uncertain if this might break the popular mercurial VSCode extension that relies on file events from HG folders:

https://github.com/mrcrowl/vscode-hg/blob/6bee18442233a1ec34fecd6033a934a3052e20ee/src/model.ts#L123

Maybe you could follow up with @mrcrowl if it would be ok to exclude .hg/store by default.

@bpasero bpasero added this to the On Deck milestone Mar 3, 2020
@Yoric
Copy link
Contributor Author

Yoric commented Mar 4, 2020

With pleasure. Is there a good way to get in touch with @mrcrowl?

@bpasero
Copy link
Member

bpasero commented Mar 4, 2020

I am not sure how active that account it, let's see if this ping comes back. Otherwise maybe a mail could work?

@mrcrowl
Copy link

mrcrowl commented Mar 5, 2020

Sorry, yeah I haven't been actively maintaining the Hg extension for a while, because my company switched to git, and my initial motivation was to encourage a switch to vscode from Visual Studio. Have been advertising for a motivated maintainer, but none has come forward.

It is heavily based on an earlier version of the baked-in git scm extension. It creates a filesystem watcher workspace.createFileSystemWatcher('**') and then filters to all events in the root .hg folder in order to detect external changes to the repo. It's not specifically watching .hg/store, however it may well be one of the places that would be touched when external events occur.

I don't want to hold up your PR, so thinking you could test this quickly on a basic Hg repo. Unfortunately, I'm not going to have an opportunity to try this myself in the next short while.

@bpasero
Copy link
Member

bpasero commented Mar 5, 2020

@mrcrowl thanks for the message 👍

@Yoric since you seem to be a client of this extension (?) could you do this:

I don't want to hold up your PR, so thinking you could test this quickly on a basic Hg repo. Unfortunately, I'm not going to have an opportunity to try this myself in the next short while.

@Yoric
Copy link
Contributor Author

Yoric commented Mar 5, 2020

I'm actually not a client of the extension, but I can test it!

@bpasero
Copy link
Member

bpasero commented Mar 5, 2020

@Yoric thanks a ton

@bpasero
Copy link
Member

bpasero commented Mar 9, 2020

@Yoric any update?

@Yoric
Copy link
Contributor Author

Yoric commented Mar 9, 2020

So far, I haven't noticed anything bad happening, but I'll admit that I haven't checked very carefully. For some reason, the coronavirus scare seems to decrease the rhythm at which rebase my tree.

@bpasero bpasero modified the milestones: On Deck, March 2020 Mar 9, 2020
@bpasero bpasero merged commit 1eee7ab into microsoft:master Mar 9, 2020
@bpasero
Copy link
Member

bpasero commented Mar 9, 2020

Fair enough, I suggest we try it out in insiders for March and wait for feedback.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code - Insiders Helper (Renderer) running at 201.1% CPU

3 participants