Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/lsp/cache: preallocate internal maps when cloning snapshots
For large codebases, the cost of copying these maps can be fairly high, especially when it needs to repeatedly grow the map's underlying storage. Preallocate these to the size of the original snapshot maps to prevent the need to grow the storage during the clone. Updates golang/go#45686 Change-Id: I4cfcd5b7cba8110e4f7e706fd9ea968aaeb6ff0c Reviewed-on: https://go-review.googlesource.com/c/tools/+/312689 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
- Loading branch information