Hiya, a few days ago I finally got around to checking out Watch and its a fantastic addition to the workflow, so thanks!
Today I noticed my laptop was getting hot though, and sure enough top revealed my four Watch instances consuming 70-80% cpu between them, despite no action on the filesystem.
These instances had been open for several days through several sleep/resume cycles which may or may not be related. A newly spawned Watch instance does not use excessive CPU.
Not sure if this will actually turn out to be a bug in Watch, as kill -ABRT on one of the instances showed only these two goroutines active:
goroutine 0 [idle]:
runtime.futex(0x6d2e38, 0x0, 0x0, 0x0, 0x0, 0x6d27c0, 0x1, 0x41198f, 0x411bae, 0x6d2e38, ...)
/usr/lib/go/src/runtime/sys_linux_amd64.s:277 +0x21
runtime.futexsleep(0x6d2e38, 0x0, 0xffffffffffffffff)
/usr/lib/go/src/runtime/os_linux.c:49 +0x47
runtime.notesleep(0x6d2e38)
/usr/lib/go/src/runtime/lock_futex.go:145 +0xae
stopm()
/usr/lib/go/src/runtime/proc.c:1178 +0x119
findrunnable(0xc208012000)
/usr/lib/go/src/runtime/proc.c:1487 +0x562
schedule()
/usr/lib/go/src/runtime/proc.c:1575 +0x151
exitsyscall0(0xc208000a20)
/usr/lib/go/src/runtime/proc.c:2021 +0xdd
runtime.mcall(0x435cc4)
/usr/lib/go/src/runtime/asm_amd64.s:186 +0x5a
goroutine 7 [syscall]:
syscall.Syscall6(0xe8, 0x6, 0xc2080a9cb4, 0x7, 0xffffffffffffffff, 0x0, 0x0, 0x8, 0xc20802a2e8, 0x7f84169fc8f0)
/usr/lib/go/src/syscall/asm_linux_amd64.s:46 +0x5
syscall.EpollWait(0x6, 0xc2080a9cb4, 0x7, 0x7, 0xffffffffffffffff, 0xc20802a2e8, 0x0, 0x0)
/usr/lib/go/src/syscall/zsyscall_linux_amd64.go:376 +0x93
github.com/go-fsnotify/fsnotify.(*fdPoller).wait(0xc20801e2c0, 0xc208052700, 0x0, 0x0)
/d/go/src/github.com/go-fsnotify/fsnotify/inotify_poller.go:85 +0xc7
github.com/go-fsnotify/fsnotify.(*Watcher).readEvents(0xc20800a370)
/d/go/src/github.com/go-fsnotify/fsnotify/inotify.go:179 +0x16f
created by github.com/go-fsnotify/fsnotify.NewWatcher
/d/go/src/github.com/go-fsnotify/fsnotify/inotify.go:58 +0x32b
(the other four goroutines had been blocked for 28 minutes)
I realise this report is probably not sufficient to solve/understand the issue. At some point I'll dig into the Watch/fsnotify code to try and gather more information, but if someone beats me to it I'm not going to complain ;)
go version go1.4.2 linux/amd64