1
0
mirror of https://github.com/golang/go synced 2024-11-05 14:56:10 -07:00
go/cmd
Josh Bleecher Snyder d4c6246f3e cmd/guru: parallelize loop in globalReferrersPkgLevel
This change parallelizes the outer loop in globalReferrersPkgLevel,
which loops over packages to inspect.

There is also an easily parallelizable inner loop.
However, parallelizing it adds complication
(deffiles needs a mutex, inQueryPackage requires a wait group)
and offers only a 2% speed-up.

Benchmarks for this change, looking for encoding/json.MarshalIndent:

name       old time/op       new time/op       delta
Referrers        5.31s ± 2%        4.67s ± 3%  -11.95%  (p=0.000 n=10+10)

name       old user-time/op  new user-time/op  delta
Referrers        15.9s ± 2%        16.5s ± 3%   +3.71%  (p=0.000 n=10+10)

name       old sys-time/op   new sys-time/op   delta
Referrers        15.7s ± 3%        16.1s ± 3%   +2.73%  (p=0.011 n=10+10)


Fixes golang/go#24272
Updates golang/go#25017


This work supported by Sourcegraph.

Change-Id: I5dcda9017103cdff59d0ffdf5e87d2c2c955a33a
Reviewed-on: https://go-review.googlesource.com/108878
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
2018-05-01 18:27:15 +00:00
..
benchcmp benchmark/parser, cmd/benchcmp: improve names of exported identifiers 2015-01-15 01:28:17 +00:00
bundle cmd/bundle: include non-associated comments 2017-07-07 17:27:36 +00:00
callgraph cmd/callgraph: fix "import path of the enclosing package" example in usage 2017-08-08 14:46:45 +00:00
compilebench cmd/compilebench: use go command in goroot, not environment 2017-05-09 19:43:46 +00:00
cover cmd/cover: check os.Create error im html output 2017-01-08 00:00:17 +00:00
digraph tools: add import comments. 2014-12-09 22:42:16 +00:00
eg cmd/eg: Gofmt eg's dry-run output. 2017-07-13 04:09:46 +00:00
fiximports cmd/godoc, cmd/fiximports: fix or skip failing tests at tip 2016-10-12 15:24:30 +00:00
getgo godoc,cmd/getgo: update download links to dl.google.com 2018-01-25 02:56:30 +00:00
go-contrib-init cmd/go-contrib-init: exit with an error if package install fails 2017-07-17 03:20:55 +00:00
godex cmd/godex: handle printing of type aliases 2017-01-11 21:17:45 +00:00
godoc blog: serve relative links when run locally 2018-04-13 18:10:15 +00:00
goimports cmd/goimports: support multiple comma-separated imports in -local flag 2018-03-05 19:26:41 +00:00
gomvpkg go/buildutil: TagsFlag provides a flag.Value for setting build.Context.BuildTags from -tags flag. 2015-04-23 14:10:21 +00:00
gorename cmd/gorename: fix test failure formatting. 2017-11-06 14:18:16 +00:00
gotype gotype: fix default importer for Go 1.8. 2017-04-10 16:28:46 +00:00
goyacc cmd/goyacc: fix an off-by-one error in lineno tracking 2018-05-01 01:19:15 +00:00
guru cmd/guru: parallelize loop in globalReferrersPkgLevel 2018-05-01 18:27:15 +00:00
heapview cmd/heapview: look for tools repository in all GOPATH entries 2017-04-10 18:12:01 +00:00
html2article x/tools/cmd/html2article: remove unused functions 2017-03-01 14:53:04 +00:00
present cmd/present: display slide numbers 2018-04-13 16:54:21 +00:00
ssadump go/ssa/interp: drop interpretation of "testing" package 2017-11-28 21:57:06 +00:00
stress cmd/stress: flush out Usage doc 2017-06-12 21:12:06 +00:00
stringer cmd/stringer: add flag to use line comment as str 2017-12-19 23:05:15 +00:00
tip cmd/tip: update talks hash to pull in e00c182 2018-02-20 22:33:34 +00:00
toolstash cmd/toolstash: don't try comparing "asm -V=full" output. 2017-11-02 22:54:56 +00:00