Comments (9)
The since query is slow? Did you change any files before running the since query, or is it slow as soon as you start it up? What if you query it a few minutes after it started up?
from watchman.
With 56fcdba or later the command is slow every time I run it: as soon as I start up and every subsequent time. I haven't tried other queries as this is the only query I need to run, but watchman -v is fast before and after 56fcdba.
from watchman.
is there anything churning through and changing files in your buck working copy while you're running the since query?
This is what I see with a non-built buck tree:
$ time echo '["query", "/Users/wez/fb/buck", {"since": "n:w00t", "fields":["name","exists","new"]}]' | ~/fb/watchman-pure/watchman --server-encoding=json --no-pretty -j > /dev/null
echo 0.00s user 0.00s system 34% cpu 0.002 total
~/fb/watchman-pure/watchman --server-encoding=json --no-pretty -j > /dev/null 0.00s user 0.00s system 0% cpu 0.656 total
$ time echo '["query", "/Users/wez/fb/buck", {"since": "n:w00t", "fields":["name","exists","new"]}]' | ~/fb/watchman-pure/watchman --server-encoding=json --no-pretty -j > /dev/null
echo 0.00s user 0.00s system 28% cpu 0.002 total
~/fb/watchman-pure/watchman --server-encoding=json --no-pretty -j > /dev/null 0.00s user 0.00s system 28% cpu 0.019 total
The code that changed should only impact how quickly we can translate fsevents items into change nodes.
The only way that I can think of that this might somehow influence the query speed is if there is a continual stream of changes coming in and if there is lock contention here:
Line 1821 in 56fcdba
I'm thinking of putting in:
if (!head) {
return;
}
ahead of that lock acquisition to avoid locking when we don't need to, but don't know that this will fundamentally change what you're seeing. Also: this wasn't changed in 56fcdba
from watchman.
Looks like this does have something to do with .watchmanconfig:
jimp-mbp1:buck jimp$ time echo '["query", "/Users/jimp/devtools/buck", {"since": "n:buckd", "fields":["name","exists","new"]}]' | watchman --server-encoding=json --no-pretty -j > /dev/null
real 0m0.019s
user 0m0.004s
sys 0m0.003s
jimp-mbp1:buck jimp$ mv .watchmanconfig.renamed .watchmanconfig
jimp-mbp1:buck jimp$ watchman shutdown-server
1387569637: tid=2033447296 failed to identify PDU: fill_buffer: No such file or directory
1387569638: tid=2033447296 failed to identify PDU: fill_buffer: Operation timed out
1387569638: tid=2033447296 unable to talk to your watchman!
jimp-mbp1:buck jimp$ time echo '["query", "/Users/jimp/devtools/buck", {"since": "n:buckd", "fields":["name","exists","new"]}]' | watchman --server-encoding=json --no-pretty -j > /dev/null
real 1m1.008s
user 0m0.004s
sys 0m0.003s
(this is with HEAD)
from watchman.
This is the contents of my .watchmanconfig:
{
"ignore_dirs": [
".git",
".buckd",
"build",
"buck-out",
"src/com/facebook/buck/cli/quickstart",
"test/com/facebook/buck/cli/testdata",
"test/com/facebook/buck/java/testdata",
"test/com/facebook/buck/junit/testdata",
"test/com/facebook/buck/parser/testdata",
"test/com/facebook/buck/shell/testdata",
"third-party/java/dalvik-jelly-bean"
]
}
from watchman.
You shouldn't ignore .git as you can break the cookie detection; maybe that's the root of the problem?
I'll dig into this a bit later, but maybe just removing that one line fixes it for you?
from watchman.
Looks like that was it, thanks!
from watchman.
Sounds like watchman should sanity check that you're not ignoring vcs dirs, or specifically, that you're not ignoring the selected cookie dir
from watchman.
I think the behavior here should be: if a dir is listed in both ignore_vcs and ignore_dirs, ignore_dirs takes precedence and the dir is removed from the effective value of ignore_vcs for the root.
This will allow someone to explicitly ignore a dir and not break the cookie mechanism.
from watchman.
Related Issues (20)
- watchman on riscv
- why watchman does not support query base on time frame and sorting ability?
- Impossible to install on Amazonlinux HOT 2
- Folly related build issue for ARM Ubuntu 18.04.5 LTS
- Missing RPMs in Release v2023.04.24.00
- WatchMan Error on Docker. Watchman-make is not accessible even after installation.
- "Settle" behavior blocks entire file tree during long running zip operation
- Unable to compile with fmt 10.0.0
- Unable to talk to your watchman on /opt/homebrew/var/run/watchman/[user]-state/sock! HOT 8
- serde_bser: Apache-2.0 license file missing from git repo and published crates
- No Mac OS X binary
- Watchman ignores platform-specific path separators in `dirname` expressions
- Watchman root is set to /Users/<username> despite being run from a different directory HOT 1
- Ubuntu packags missing since May HOT 3
- "I don't know how to install any packages on this system linux-mint-21.2"
- Watchman warns on custom_config example line
- Installation guide HOT 2
- Question - `hint_num_files_per_dir` recursive or not?
- Watchman service is timing out waiting for a synchronization cookie file to be observed by the watcher within 20000 milliseconds HOT 2
- Deploy on winget
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watchman.