/ go Public
x/tools/gopls: filecache.gc is expensive in tests #60162
Issues related to gopls performance (CPU, memory, etc).
Issues related to the Go language server, gopls.
This label describes issues relating to any tools in the x/tools repository.
time go test -short -count=1 ./gopls/...takes 60s today, but only 40s if we disable the filecache.gc thread. (This is on macOS, whose filesystem often seems to be much slower than Linux.) Every gopls test process is running its own redundant filepath.Walk of the cache directory.
Given that we recently decided to give up trying to rely on the production GC behavior (and will set GOPLSCACHE=$(mktemp -d) for each builder run), it might make sense to add a 1m delay to the GC thread so that it never runs at all in the tests. But it's also possible that the change to use a fresh GOPLSCACHE per builder run reduces the amount of cache visited by each gc so much that it doesn't matter.
The text was updated successfully, but these errors were encountered: