-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal/lsp/cache: use persistent map for storing gofiles in the snapshot #382
Conversation
This PR (HEAD: 159eb75) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: 8c25760) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
benchmark shows 40% reduction against ad756c7 on linux/amd64 for DidChange
|
Message from Alan Donovan: Patch Set 3: (5 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Alan Donovan: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
8c25760
to
d6691bc
Compare
This PR (HEAD: d6691bc) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
Message from Ruslan Nigmatullin: Patch Set 4: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Ruslan Nigmatullin: Patch Set 4: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
d6691bc
to
fcf814c
Compare
This PR (HEAD: fcf814c) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: 599c2a3) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
Message from Ruslan Nigmatullin: Patch Set 6: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Ruslan Nigmatullin: Patch Set 6: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
This PR (HEAD: 9b6e3e1) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
Message from Alan Donovan: Patch Set 9: (17 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Ruslan Nigmatullin: Patch Set 9: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Ruslan Nigmatullin: Patch Set 9: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
9b6e3e1
to
f0b31fd
Compare
This PR (HEAD: f0b31fd) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: 0e5720f) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
Message from Ruslan Nigmatullin: Patch Set 11: (16 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Alan Donovan: Patch Set 12: Code-Review+2 (5 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
0e5720f
to
b211d6c
Compare
This PR (HEAD: b211d6c) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
Message from Ruslan Nigmatullin: Patch Set 13: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
…pshot 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 generically extended to avoid copying s.files and s.packages. Updates golang/go#45686 Change-Id: Ic4a9b3c8fb2b66256f224adf9896ddcaaa6865b1 GitHub-Last-Rev: b211d6c GitHub-Pull-Request: golang#382
b211d6c
to
a284a97
Compare
This PR (HEAD: a284a97) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
Message from Hyang-Ah Hana Kim: Patch Set 14: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Ruslan Nigmatullin: Patch Set 14: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Robert Findley: Patch Set 14: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Gopher Robot: Patch Set 14: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from kokoro: Patch Set 14: Kokoro presubmit build starting for golang/tools/gopls-legacy/presubmit Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from kokoro: Patch Set 14: gopls-CI+1 Kokoro presubmit build finished with status: SUCCESS Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Gopher Robot: Patch Set 14: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Robert Findley: Patch Set 14: (11 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
…pshot 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 generically extended to avoid copying s.files and s.packages. Updates golang/go#45686 Change-Id: Ic4a9b3c8fb2b66256f224adf9896ddcaaa6865b1 GitHub-Last-Rev: b211d6c GitHub-Pull-Request: golang#382
a284a97
to
0abd257
Compare
This PR (HEAD: 0abd257) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/411554 to see it. Tip: You can toggle comments from me using the |
Message from Ruslan Nigmatullin: Patch Set 16: (10 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Robert Findley: Patch Set 16: Run-TryBot+1 Code-Review+2 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from Gopher Robot: Patch Set 16: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from kokoro: Patch Set 16: Kokoro presubmit build starting for golang/tools/gopls-legacy/presubmit Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
Message from kokoro: Patch Set 16: gopls-CI+1 Kokoro presubmit build finished with status: SUCCESS Please don’t reply on this GitHub thread. Visit golang.org/cl/411554. |
…pshot 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: 0abd257 GitHub-Pull-Request: #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>
This PR is being closed because golang.org/cl/411554 has been merged. |
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