chromium / vs-chromium

A Visual Studio extension containing a collection of tools to help contributing code to the Chromium project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extra calls to GetFileAttributes for ignored files

rpaquay opened this issue · comments

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.

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.