Slow bazel go builds

130 views
Skip to first unread message

tommy...@gmail.com

unread,
Jan 12, 2017, 7:19:08 PM1/12/17
to bazel-discuss
I'm experiencing slow linking times with bazel and golang. Can anyone give me any ideas on what could be going on, or how to look into the problem further? Here's some example profiling output:

Thanks!

=== PHASE SUMMARY INFORMATION ===

Total launch phase time 6.00 ms 0.07%
Total init phase time 486 ms 5.83%
Total loading phase time 1.64 ms 0.02%
Total analysis phase time 0.99 ms 0.01%
Total preparation phase time 6.17 ms 0.07%
Total execution phase time 7.842 s 93.97%
Total finish phase time 2.29 ms 0.03%
Total run time 8.345 s 100.00%

=== INIT PHASE INFORMATION ===

Total init phase time 486 ms

Total time (across all threads) spent on:
Type Total Count Average
VFS_STAT 4.25% 2 13.4 ms
VFS_DIR 18.56% 10 11.7 ms

=== LOADING PHASE INFORMATION ===

Total loading phase time 1.64 ms

Total time (across all threads) spent on:
Type Total Count Average

=== ANALYSIS PHASE INFORMATION ===

Total analysis phase time 0.99 ms

Total time (across all threads) spent on:
Type Total Count Average

=== EXECUTION PHASE INFORMATION ===

Total preparation time 6.17 ms
Total execution phase time 7.842 s
Total time finalizing build 2.29 ms

Action dependency map creation 0.00 ms
Actual execution time 7.842 s

Total time (across all threads) spent on:
Type Total Count Average
ACTION 0.02% 10 0.40 ms
ACTION_CHECK 0.03% 10 0.83 ms
ACTION_EXECUTE 26.83% 10 650 ms
ACTION_COMPLETE 0.00% 10 0.04 ms
INFO 0.00% 1 0.00 ms
UPLOAD_TIME 0.59% 11 13.1 ms
FETCH 2.08% 9 56.0 ms
VFS_STAT 0.17% 8917 0.00 ms
VFS_READLINK 0.00% 47 0.01 ms
VFS_MD5 3.94% 29 32.9 ms
VFS_DELETE 0.03% 11 0.72 ms
VFS_OPEN 0.00% 14 0.04 ms
VFS_READ 0.06% 4747 0.00 ms
VFS_WRITE 0.01% 185 0.01 ms
WAIT 0.00% 18 0.00 ms
SKYFRAME_EVAL 32.35% 1 7.841 s
SKYFUNCTION 33.88% 28 293 ms

Critical path (7.807 s):
Id Time Percentage Description
117 0.61 ms 0.01% Middleman _middlemen/redacted
115 4.648 s 59.53% go buildexe redacted.exe
114 235 ms 3.01% go build lib redacted.a
113 244 ms 3.12% go build lib redacted.a
112 371 ms 4.75% go build lib redacted.a
111 362 ms 4.64% go build lib redacted.a
110 400 ms 5.13% go build lib redacted.a
109 248 ms 3.17% go build lib redacted.a
108 1.294 s 16.57% go build lib redacted.a
5.74 ms 0.07% [2 middleman actions]

Damien Martin-guillerez

unread,
Jan 12, 2017, 7:31:18 PM1/12/17
to tommy...@gmail.com, bazel-discuss
   115     4.648 s   59.53%   go buildexe redacted.exe <-- this single action takes 4.6s out of 8.3, I guess that the go linking phase.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/368db114-7155-4088-87f6-4bde08b8b5ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages