1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:34:39 -07:00
go/godoc/vfs
Andrew Gerrand a2a552218a godoc: rate limit file parsing on startup, improve diagnostics
When building the corpus of local packages, a "too many open files"
error would cause some directories inside GOPATH to be skipped.
Further, the error would not be reported because it was masked by a
"file not found" error from the GOROOT VFS layer.

This change adds a rate limit around parsing files when buildling
the directory tree, error reporting when godoc is run with -v, and
fixes the masked error issue in the vfs package.

It's possible that the rate limiting could be put into the
godoc/vfs/gatefs package, but I tried making the gate account for
open files (not just individual open/close/read/write operations)
but then godoc just hard locks (it wasn't designed to only open 20
files at once).

Change-Id: I925d120b53d9a86430b6977cb90eb143785ecc48
Reviewed-on: https://go-review.googlesource.com/24060
Reviewed-by: Dave Day <djd@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-14 05:10:12 +00:00
..
gatefs tools: add import comments. 2014-12-09 22:42:16 +00:00
httpfs tools: add import comments. 2014-12-09 22:42:16 +00:00
mapfs tools: add import comments. 2014-12-09 22:42:16 +00:00
zipfs godoc/vfs/zipfs: use an os.IsNotExist-compatible error 2016-02-15 04:18:10 +00:00
emptyvfs_test.go x/tools/godoc/vfs: adds NewNameSpace() and emptyVFS for better behavior 2016-03-21 00:49:05 +00:00
emptyvfs.go x/tools/godoc/vfs: adds NewNameSpace() and emptyVFS for better behavior 2016-03-21 00:49:05 +00:00
namespace.go godoc: rate limit file parsing on startup, improve diagnostics 2016-06-14 05:10:12 +00:00
os.go godoc/vfs: close file on error 2015-06-01 03:28:17 +00:00
vfs.go tools: add import comments. 2014-12-09 22:42:16 +00:00