tanghong123 / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

need to speed up the autotools build script #110

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
gtest's autotools build script is compiling gtest and
its tests with -O2.  As a result, it takes a lot of time to do a clean
make - much more than it takes to run the built tests:

$ mkdir out && cd out
$ time ../configure
real    0m49.203s
$ time make
real    1m1.742s
$ time make check
real    2m41.480s
$ time make check
real    0m10.236s

Note that:

- the first 'make check' takes 2m41s while the second one takes 10s,
suggesting the the compilation of the tests takes 2m31s while running
them only takes 10s.

So most of the build time is spent on compiling the tests, followed by
the time on compiling gtest itself.  By turning off -O2, we can speed
up both.

I repeated the experiment with -O0 in a fresh output directory.
The result:

$ time make
real    0m45.791s
$ time make check
real    1m17.178s
$ time make check
real    0m9.791s

So the total build & test time (make && make check) has come down from
3m43s to 2m3s, while the test execution time is still ~10s.

Original issue reported on code.google.com by zhanyong...@gmail.com on 6 Feb 2009 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by zhanyong...@gmail.com on 5 Jun 2009 at 5:48

GoogleCodeExporter commented 9 years ago
The autotools scripts have already been significantly trimmed.

Original comment by w...@google.com on 23 Dec 2009 at 7:02