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

Extra calls to GetFileAttributes for ignored files #40

Closed
rpaquay opened this issue Dec 22, 2017 · 1 comment
Closed

Extra calls to GetFileAttributes for ignored files #40

rpaquay opened this issue Dec 22, 2017 · 1 comment

Comments

@rpaquay
Copy link
Contributor

rpaquay commented Dec 22, 2017

VsChromium makes two call to GetFileAttributesEx whenever a file is changed on disk, even for files that are ignored. These calls should not happen.

Repo:

  • Create a vs-chromium-project.txt file in a new empty directory
  • Add a section to ignore *.bin files (for example)
[SourceExplorer.ignore]
*.bin
  • Open the project in Visual Studio
  • Open ProcMon and filter events from VsChromium.Server.exe
  • Open a command prompt and "cd" to the project directory
  • Type "echo >foo.bin" in the command prompt

Result:

  • ProcMon shows that VsChromium.Server.exe make two calls to "CreateFile" (coming from GetFileAttributesEx)

Expected:

  • ProcMon should not show any disk activity from VsChromium.Server.exe

Thanks to @randomascii for reporting the issue.

rpaquay added a commit that referenced this issue Dec 22, 2017
If a path is in the "ignore" section, don't perform
disk I/O before filtering the file change notification out.

Fixes bug #40
@rpaquay rpaquay closed this as completed Dec 23, 2017
@randomascii
Copy link

Sweet. This will probably reduce the overhead of having VsChromium running during a build although I have no estimate as to how much. Given how expensive CreateFile can be on Windows it may well be a worthwhile optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants