Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Polling fallback #97

Closed
nathany opened this issue May 24, 2014 · 3 comments
Closed

Polling fallback #97

nathany opened this issue May 24, 2014 · 3 comments

Comments

@nathany
Copy link
Contributor

nathany commented May 24, 2014

@pifantastic requested a polling fallback here #89 (comment)

GoConvery actually uses polling exclusively to avoid the "too many files" error (kqueue).

"we walk the file system every quarter second and use the sum of the last mod time stamp and size of each go file as a quick comparison. Along the way we make note of new and deleted packages, all the while skipping 'ignored' packages. It's actually quite speedy." - @mdwhatcott, Gopher Slack

https://github.com/smartystreets/goconvey/blob/master/web/server/watcher/scanner.go

I'm not sure if it should be part of fsnotify proper or not, but it should be easy to add one.

@pifantastic
Copy link

This is very nice! Thanks for pointing this out @nathany.

@mdwhatcott
Copy link

If you use an approach like what I've done in GoConvey, make sure to count empty directories as well...

@nathany
Copy link
Contributor Author

nathany commented Jul 11, 2014

@nathany nathany closed this as completed Jul 11, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants