Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
99775: ui: add empty go.mod files to workspaces r=knz a=stevendanna Some go tools such as go list end up traversing directories that don't have go.mod files, looking for go packages. If you happen to have built the UI recently, that means tens of thousands of extra stat calls. On macOS, this is very expensive, even with warm caches. For example: ``` time go list -modfile=go.mod -mod=readonly -e ARGS_ELIDED -- builtin github.com/cockroachdb/cockroach/... > /dev/null 2>&1 real 0m28.309s user 0m23.541s sys 0m50.926s > for i in pkg/ui/workspaces/*/; do touch $i/go.mod; done > time go list -modfile=go.mod -mod=readonly -e ARGS_ELIDED -- builtin github.com/cockroachdb/cockroach/... > /dev/null 2>&1 real 0m13.074s user 0m18.282s sys 0m19.324s ``` The go list command I used was taken from what I observed gopls running at startup. On Linux, the impact relatively modest. I could avoid building the UI, but I like the UI. Epic: none Release note: none Co-authored-by: Steven Danna <[email protected]>
- Loading branch information