-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
watch: increase the windows watch i/o buffer (#3620)
fixes #3556
- Loading branch information
Showing
10 changed files
with
112 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// +build !windows | ||
|
||
package watch | ||
|
||
import "github.com/tilt-dev/fsnotify" | ||
|
||
func MaybeIncreaseBufferSize(w *fsnotify.Watcher) { | ||
// Not needed on non-windows | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// +build windows | ||
|
||
package watch | ||
|
||
import ( | ||
"github.com/tilt-dev/fsnotify" | ||
) | ||
|
||
// TODO(nick): I think the ideal API would be to automatically increase the | ||
// size of the buffer when we exceed capacity. But this gets messy, | ||
// because each time we get a short read error, we need to invalidate | ||
// everything we know about the currently changed files. So for now, | ||
// we just provide a way for people to increase the buffer ourselves. | ||
// | ||
// It might also pay to be clever about sizing the buffer | ||
// relative the number of files in the directory we're watching. | ||
func MaybeIncreaseBufferSize(w *fsnotify.Watcher) { | ||
w.SetBufferSize(DesiredWindowsBufferSize()) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters