]> Cypherpunks repositories - gostls13.git/commit
cmd/go: don't call ImportDir unnecessarily
authorAnthony Martin <ality@pbrane.org>
Fri, 22 Feb 2013 04:09:31 +0000 (20:09 -0800)
committerAnthony Martin <ality@pbrane.org>
Fri, 22 Feb 2013 04:09:31 +0000 (20:09 -0800)
commited1ac056735e67c0f6bc23c60a9c2a0f999c80cb
treed128c7a09b5474e09baa0aee3b7bbe1352217164
parentedc3126e98d5624d6f2a7d47991db0ba5b2b07d3
cmd/go: don't call ImportDir unnecessarily

This significantly speeds up the go tool on
slow file systems (or those with cold caches).

The following numbers were obtained using
an encrypted ext4 file system running on
Linux 3.7.9.

# Before
$ sudo sysctl -w 'vm.drop_caches=3'
$ time go list code.google.com/p/go.net/... | wc -l
9

real 0m16.921s
user 0m0.637s
sys 0m0.317s

# After
$ sudo sysctl -w 'vm.drop_caches=3'
$ time go list code.google.com/p/go.net/... | wc -l
9

real 0m8.175s
user 0m0.220s
sys 0m0.177s

R=rsc, r
CC=golang-dev
https://golang.org/cl/7369044
src/cmd/go/main.go