[tools] gopls/internal/filecache: reduce I/O parallelism

0 views
Skip to first unread message

Alan Donovan (Gerrit)

unread,
Oct 20, 2026, 8:37:18 PM (3 days ago) Oct 20
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Alex Putman, Peter Weinberger, golang...@luci-project-accounts.iam.gserviceaccount.com, Hongxiang Jiang, golang-co...@googlegroups.com

Alan Donovan submitted the change

Change information

Commit message:
gopls/internal/filecache: reduce I/O parallelism

This CL reduces the parallelism for writes to 8 (was 128).
This reduced time of a cold "gopls check" of k8s kubelet:
- wall 22.2s -> 20.0s (n=3)
- sys 46.9s -> 42.6s.

On macOS, Set/Get account for 20% of CPU, mostly in open(2).
(Both sys and wall time in open were 4-5x higher before.)

Splitting the Set and Get operations into separate
semaphores was evaluated but not found profitable.
Change-Id: Icae8e626f549df2fd5dcfedacf58211b2ad52850
Reviewed-by: Peter Weinberger <p...@google.com>
Reviewed-by: Alex Putman <apu...@golang.org>
Files:
  • M gopls/internal/filecache/filecache.go
  • M gopls/internal/filecache/filecache_test.go
Change size: S
Delta: 2 files changed, 12 insertions(+), 3 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: Icae8e626f549df2fd5dcfedacf58211b2ad52850
Gerrit-Change-Number: 847645
Gerrit-PatchSet: 4
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alex Putman <apu...@golang.org>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Peter Weinberger <p...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages