1
0
mirror of https://github.com/golang/go synced 2024-10-01 05:18:33 -06:00
go/internal/lsp/cache
Rebecca Stambler b012c19798 internal/lsp: trim ASTs for which we do not require function bodies
This change trims the function bodies from the ASTs of files belonging to
dependency packages. In these cases, we do not necessarily need full
file ASTs, so it's not necessary to store the function bodies in memory.

This change will reduce memory usage. However, it will also slow down
the case of a user opening a file in a dependency package, as we will
have to re-typecheck the file to get the full AST. Hopefully, this
increase in latency will not be significant, as we will only need to
re-typecheck a single package (all the dependencies should be cached).

Updates golang/go#30309

Change-Id: I7871ae44499c851d1097087bd9d3567bb27db691
Reviewed-on: https://go-review.googlesource.com/c/tools/+/178719
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-06-03 19:34:55 +00:00
..
cache.go internal/lsp: debug pages for sessions views and files 2019-06-03 17:39:32 +00:00
check.go internal/lsp: trim ASTs for which we do not require function bodies 2019-06-03 19:34:55 +00:00
external.go internal/lsp: add a file system abstraction 2019-05-24 13:48:47 +00:00
file.go internal/lsp: refactor to separate pieces of type-checking 2019-05-30 04:37:10 +00:00
gofile.go internal/lsp: trim ASTs for which we do not require function bodies 2019-06-03 19:34:55 +00:00
load.go internal/lsp: trim ASTs for which we do not require function bodies 2019-06-03 19:34:55 +00:00
modfile.go internal/lsp: add modfile, sumfile structs, require Go files for diagnostics 2019-05-24 21:02:28 +00:00
parse.go internal/lsp: trim ASTs for which we do not require function bodies 2019-06-03 19:34:55 +00:00
pkg.go internal/lsp: fix regression from CL 179439 2019-06-03 19:23:55 +00:00
session.go internal/lsp: build the builtin package preemptively 2019-06-03 18:19:26 +00:00
sumfile.go internal/lsp: add modfile, sumfile structs, require Go files for diagnostics 2019-05-24 21:02:28 +00:00
view.go internal/lsp: build the builtin package preemptively 2019-06-03 18:19:26 +00:00
watcher.go internal/lsp: add file watching and use it to trigger invalidations 2019-05-24 14:03:12 +00:00