1
0
mirror of https://github.com/golang/go synced 2024-10-01 11:28:34 -06:00
go/internal/lsp/cache
Sander van Harmelen 128824a23e internal/lsp: prevent too much open files issues
On MacOS the default open file limit is 256 files per process. For big
projects this could cause issues when reading all files (more or less)
at the same time.

By moving up the `parseLimit` so the reading of the file is only done
when it is allowed to start parsing the file, we stay well below the 256
files per process (as the `parseLimit` is currently set to 20).

Since `parseLimit` is actually only used to limit IO access, let's also
rename the const to `parseLimit`.

Change-Id: Ie8744030875d84d0d6095ee4ec2d9d553911bed1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/189437
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
2019-08-08 17:29:24 +00:00
..
cache.go internal/lsp: remove the non context xlog path 2019-07-15 03:45:47 +00:00
check.go x/tools/cmd/gopls: prevent nil pointer dereferences 2019-08-07 22:35:07 +00:00
external.go internal/lsp: extra telemetry tagging of files and packages 2019-07-31 19:44:43 +00:00
file.go internal/lsp: cache the *ast.File and *token.File on the package 2019-07-16 19:44:59 +00:00
gofile.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00
load.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00
modfile.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00
parse.go internal/lsp: prevent too much open files issues 2019-08-08 17:29:24 +00:00
pkg.go internal/lsp: cache the *ast.File and *token.File on the package 2019-07-16 19:44:59 +00:00
session.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00
sumfile.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00
token.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00
view.go internal/lsp: prevent too much open files issues 2019-08-08 17:29:24 +00:00
watcher.go internal/lsp: fix deadlocks loading lots of files at once 2019-07-03 17:22:52 +00:00