Closed
Description
For example, on a moderately sized module of mine:
$ /usr/bin/time go mod verify
all modules verified
13.33user 2.39system 0:15.78elapsed 99%CPU (0avgtext+0avgdata 24472maxresident)k
1558152inputs+0outputs (0major+4086minor)pagefaults 0swaps
Given that I have four physical CPU cores, and that the bottleneck seems to be hashing moderately sized zip files on disk, I think there's plenty of room for improvement.
For example, if we verified up to GOMAXPROCS concurrently, I expect the process could easily get two or three times faster on my laptop.
I realise that this command doesn't need to be super fast, but I make use of it for "module sanity checks" in CI along with others like go mod tidy
, so it's unfortunate that it doesn't make proper use of the resources available.