Compilation Time is Too Long
Thanks for being so informative and I appreciate your help a lot. I follow your instructions and compile the small binary “transport_security_state_generator”. This is the time I got:
python ../depot_tools/post_build_ninja_summary.py -C out/reduced/
Longest build steps:
17.9 weighted s to build obj/third_party/perfetto/src/trace_processor/storage_minimal/trac… (376.3 s elapsed time)
12.8 weighted s to build obj/third_party/boringssl/boringssl/bcm.o (410.8 s elapsed time)
22.2 weighted s to build obj/third_party/perfetto/src/tracing/core/service/tracing_service… (514.7 s elapsed time)
48.5 weighted s to build obj/third_party/protobuf/protobuf_full/descriptor.o (580.7 s elapsed time)
27.1 weighted s to build obj/third_party/perfetto/src/trace_processor/storage/storage/trac… (655.9 s elapsed time)
35.5 weighted s to build obj/third_party/perfetto/src/trace_processor/storage_minimal/trac… (940.7 s elapsed time)
645.1 weighted s to build obj/third_party/perfetto/src/trace_processor/db/db/column.o (1961.4 s elapsed time)
1133.4 weighted s to build obj/base/base/scoped_file_linux.o (2275.4 s elapsed time)
1064.1 weighted s to build obj/third_party/perfetto/src/base/base/metatrace.o (2413.7 s elapsed time)
826.1 weighted s to build obj/third_party/perfetto/src/tracing/core/service/metatrace_write… (2671.7 s elapsed time)
Time by build-step type:
3.1 s weighted time to generate 18 (no extension found) files (9.0 s elapsed time sum)
3.4 s weighted time to generate 1 .instantiations.o files (109.5 s elapsed time sum)
4.3 s weighted time to generate 15 .gen.cc files (107.0 s elapsed time sum)
5.4 s weighted time to generate 9 .so (linking) files (15.2 s elapsed time sum)
5.5 s weighted time to generate 2 .ipc.o files (115.0 s elapsed time sum)
8.7 s weighted time to generate 29 .pbzero.cc files (216.1 s elapsed time sum)
13.2 s weighted time to generate 148 .pbzero.o files (407.5 s elapsed time sum)
37.4 s weighted time to generate 12 .pb.o files (1163.6 s elapsed time sum)
116.4 s weighted time to generate 63 .gen.o files (3304.2 s elapsed time sum)
6371.3 s weighted time to generate 1695 .o files (89213.4 s elapsed time sum)
6570.9 s weighted time (94689.1 s elapsed time sum, 14.4x parallelism)
2385 build steps completed, average of 0.36/s
The server is shared by others running a few qemu processes, maybe the slowdown also comes from the CPU switching.
Read more here: Source link