Bug 2058179 - Add a .watchmanconfig to exclude in-tree objdirs from watchman r=firefox-build-system-reviewers,ahochheiden
Without a .watchmanconfig, watchman watches the whole source tree including the in-tree objdir. Watchman's default ignore_vcs covers .git, but build output is not covered. On a Linux checkout this accounted for ~9600 extra inotify watches, and a build's event burst can overflow fs.inotify.max_queued_events (16384 by default), which forces a watchman recrawl. A recrawl makes git's core.fsmonitor hook report a fresh instance, which invalidates git's untracked cache. The next `git status` then calls opendir() on 41713 directories instead of 0, costing roughly 1.2s extra on a 472k-file checkout. Both obj*/ and artifacts/ are already gitignored, so suppressing watchman events for them cannot cause git to miss a change. ignore_dirs does not support globs, so the entries have to be exact paths: the default obj-@CONFIG_GUESS@ names produced by mach plus a few common mozconfig conventions. Developers using another objdir name can add their own, and an objdir outside the source tree needs no entry at all. The file has to stay strict JSON, because watchman silently discards the entire config if it contains comments. DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D314383
This commit is contained in:
committed by
sledru@mozilla.com
parent
65fd6cd3dc
commit
aefee1489a
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"ignore_dirs": [
|
||||
"artifacts",
|
||||
"obj-aarch64-apple-darwin",
|
||||
"obj-aarch64-unknown-linux-gnu",
|
||||
"obj-x86_64-apple-darwin",
|
||||
"obj-x86_64-pc-linux-gnu",
|
||||
"obj-x86_64-pc-mingw32",
|
||||
"obj-debug",
|
||||
"obj-ff-dbg",
|
||||
"obj-ff-opt",
|
||||
"obj-opt",
|
||||
"objdir"
|
||||
]
|
||||
}
|
||||
@@ -41,6 +41,9 @@ with Files(".hgignore"):
|
||||
with Files(".hgtags"):
|
||||
BUG_COMPONENT = ("Firefox Build System", "General")
|
||||
|
||||
with Files(".watchmanconfig"):
|
||||
BUG_COMPONENT = ("Firefox Build System", "General")
|
||||
|
||||
with Files("docs/**"):
|
||||
BUG_COMPONENT = ("Developer Infrastructure", "Source Documentation")
|
||||
SCHEDULES.exclusive = ["docs"]
|
||||
|
||||
Reference in New Issue
Block a user