chromium / vs-chromium

A Visual Studio extension containing a collection of tools to help contributing code to the Chromium project.
BSD 3-Clause "New" or "Revised" License
311 stars 90 forks source link

VsChromium sometimes performs a full file system rescans during heavy disk activity #41

Closed rpaquay closed 6 years ago

rpaquay commented 6 years ago

When there is a lot of disk activity, VsChromium will sometimes perform a full file system rescan. The reason is that the internal buffer size used for File Change Notification is limited to 60KB. When there is a lot of disk activity, the buffer is not large enough, and file changes are missed.

VsChromium detects that occurrence and initiates a full file system rescan (as opposed to an incremental one) as a safety measure, since it does not know exactly what happened on disk.

The (obvious in insight) solution is to increase the buffer size, which seems to work, even though the .NET documentation mentions to maximum buffer size is 65KB. Experiment with a 2MB buffer not only worked, but also eliminated all occurrence of buffer overflowing.