mish spinning CPU when idle
Closed this issue · 6 comments
mish is idling at 10-20% CPU usage when I have the Millfile and some watched files open in vim but otherwise not doing anything. What's it doing?
Likely some files it's watching are changing b/c of system things as opposed to b/c of your edits. Something like .git, logs, etc. If you look at the status bar at the bottom right, does it list queued files that you wouldn't expect, and/or does the "revision" number unexpectedly tick up?
Short term solution is to ignore those files when calling watch
, e.g.:
watch("**", "!.git/**", "node_modules/**", "**/*.log)
Lmk if that gets your CPU usage down to a reasonable level.
We're working on figuring out a longer-term solution.
...wait I lied, this might be a completely different bug.
Next question: what OS are you running?
Yeah, I figured that's what might be happening, since this is a Rust project and the compiler creates zillions of files (ok... only ~1,500 files) under target/*/incremental/*
and stuff. But I tried adding all that to the Millfile and it didn't help (it did reduce the "Revision" number though!).
Here is the Millfile:
watch("**", "!.git/**", "!**/*.sw*", "!**/*~", "!target/**")
autorun("./Cargo.toml", "**/*.rs")
sh("cargo build")
sh("RUST_BACKTRACE=1 cargo test")
I'm running macOS High Sierra 10.13.4.
Ha alright, this was two different bugs -- a comprehensive ignore list for watch
solves one, and we've got a change in flight to solve the other, stay tuned.
Down to ~1% now!