go/internal/lsp/source
Ruslan Nigmatullin f60e9bc48f internal/lsp/cache: use persistent map for storing gofiles in the snapshot
Use treap (https://en.wikipedia.org/wiki/Treap) as a persistent map to avoid copying s.goFiles across generations.
Maintain an additional s.parseKeysByURIMap to avoid scanning s.goFiles on individual file's content invalidation.

This on average reduces didChange latency on internal codebase from 160ms to 150ms.

In a followup the same approach can be used to avoid copying s.files, s.packages, and s.knownSubdirs.

Updates golang/go#45686

Change-Id: Ic4a9b3c8fb2b66256f224adf9896ddcaaa6865b1
GitHub-Last-Rev: 0abd2570ae9b20ea7126ff31bee69aa0dc3f40aa
GitHub-Pull-Request: golang/tools#382
Reviewed-on: https://go-review.googlesource.com/c/tools/+/411554
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-22 21:10:11 +00:00
..
completion internal/lsp/source: eliminate ColumnMapper.PointSpan in favor of Pos 2022-06-01 19:19:59 +00:00
add_import.go internal/lsp: add list_known_packages and add_import commands 2021-05-23 03:57:00 +00:00
api_json.go internal/lsp: add settings for inlay hints and enable 2022-06-22 17:08:41 +00:00
call_hierarchy.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
code_lens.go
comment.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
comment_test.go internal/lsp/source: refactor commentToMarkdown function 2021-05-19 23:19:09 +00:00
diagnostics.go internal/lsp: remove unused code 2022-03-17 13:53:41 +00:00
extract.go internal: remove unneeded FileSets 2022-06-06 20:47:10 +00:00
fix.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
folding_range.go internal/lsp: foldable multiline strings 2022-01-04 20:54:25 +00:00
format.go internal/span: eliminate TokenConverter 2022-06-01 19:19:15 +00:00
format_test.go internal/lsp: use source.Offset instead of tok.Offset 2021-10-12 22:12:04 +00:00
gc_annotations.go internal/lsp: key GC details off package ID 2021-03-02 22:01:38 +00:00
highlight.go internal/lsp/source: eliminate ColumnMapper.PointSpan in favor of Pos 2022-06-01 19:19:59 +00:00
hover.go internal/lsp/source: eliminate ColumnMapper.PointSpan in favor of Pos 2022-06-01 19:19:59 +00:00
identifier.go internal/lsp/source: eliminate ColumnMapper.PointSpan in favor of Pos 2022-06-01 19:19:59 +00:00
identifier_test.go internal/span: eliminate TokenConverter 2022-06-01 19:19:15 +00:00
implementation.go internal/lsp/source: eliminate ColumnMapper.PointSpan in favor of Pos 2022-06-01 19:19:59 +00:00
inlay_hint.go internal/lsp: add settings for inlay hints and enable 2022-06-22 17:08:41 +00:00
known_packages.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
options.go internal/lsp: add settings for inlay hints and enable 2022-06-22 17:08:41 +00:00
options_test.go gopls: upgrade staticcheck to v0.3.0 2022-04-07 14:59:24 +00:00
references.go internal/lsp: find references to package 2022-06-21 19:39:47 +00:00
rename.go internal/lsp: factor out column mapper construction from content 2022-06-01 19:19:49 +00:00
rename_check.go internal/span: eliminate TokenConverter 2022-06-01 19:19:15 +00:00
signature_help.go internal/lsp/source: eliminate ColumnMapper.PointSpan in favor of Pos 2022-06-01 19:19:59 +00:00
source_test.go internal/lsp: initial test set up for inlay hints 2022-06-09 20:27:29 +00:00
stub.go internal: remove unneeded FileSets 2022-06-06 20:47:10 +00:00
symbols.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
types_format.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
util.go internal/lsp/cache: honor the go.work for computing workspace packages 2022-06-22 14:00:53 +00:00
util_test.go internal/span: eliminate TokenConverter 2022-06-01 19:19:15 +00:00
view.go internal/lsp/cache: use persistent map for storing gofiles in the snapshot 2022-06-22 21:10:11 +00:00
workspace_symbol.go internal/lsp/cache: minor simplifications to Symbols 2022-06-21 20:15:42 +00:00
workspace_symbol_test.go internal/lsp/source: parse symbol queries when using fastfuzzy 2022-01-19 15:06:07 +00:00