1.9.3 startup delay

I’ve just tried 1.9.3 on Linux (Debian Stretch, X86_64) and found that programs experience a startup delay of about 20 seconds. This is for both test and normal operation.

hbarta@yggdrasil:~/Documents/go/src/oak/HankB/filededup$ time go test -v
=== RUN   TestMin
--- PASS: TestMin (0.00s)
=== RUN   TestCompareByteByByte
--- PASS: TestCompareByteByByte (0.01s)
=== RUN   TestLinkFile
--- PASS: TestLinkFile (0.00s)
=== RUN   Example_getHash
--- PASS: Example_getHash (0.00s)
=== RUN   Example_insertFile
--- PASS: Example_insertFile (0.03s)
=== RUN   Example_findMatch
--- PASS: Example_findMatch (0.08s)
PASS
ok  	oak/HankB/filededup	0.119s

real	0m23.088s
user	0m22.504s
sys	0m0.448s
hbarta@yggdrasil:~/Documents/go/src/oak/HankB/filededup$

With 1.9.2 the result is

hbarta@yggdrasil:~/Documents/go/src/oak/HankB/filededup$ time go test -v
=== RUN   TestMin
--- PASS: TestMin (0.00s)
=== RUN   TestCompareByteByByte
--- PASS: TestCompareByteByByte (0.01s)
=== RUN   TestLinkFile
--- PASS: TestLinkFile (0.00s)
=== RUN   Example_getHash
--- PASS: Example_getHash (0.00s)
=== RUN   Example_insertFile
--- PASS: Example_insertFile (0.03s)
=== RUN   Example_findMatch
--- PASS: Example_findMatch (0.07s)
PASS
ok  	oak/HankB/filededup	0.111s

real	0m0.440s
user	0m0.352s
sys	0m0.040s
hbarta@yggdrasil:~/Documents/go/src/oak/HankB/filededup$ 

During this period top reports cc1 running at 100% on one core.

Is anyone else seeing this?

At present this project is hosted on a private git server but I could put it up on Github if that would be helpful.

Thanks!

A first guess—does the delay still occur after running go build -i once? The -i flag installs the dependencies of the current package, so next time they do not have to be compiled again.

(I found a somehow related case here.)

Good guess! (I’m inclined to classify that as a well educated guess.)

I’ll guess that when I originally installed some packages the installer performed the equivalent operation.

Thanks!

1 Like

Just a remark for completness sake - the -i flag will not be necessary anymore from Go 1.10 onwards.

That will be helpful for people like me. :smiley:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.