[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 1/2] [ng] check: memoize some internal vars (avoid
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 1/2] [ng] check: memoize some internal vars (avoid useless recalculation) |
Date: |
Wed, 16 May 2012 15:04:53 +0200 |
Thanks to our recently-introduced support for memoization of make
variables, we can avoid some useless re-calculation of few internal
variables used by the parallel testsuite harness support, thus
improving performances in some common use cases.
More precisely, we have measured the times required to complete null
"make all", "make recheck" and "make check AM_LAZY_CHECK=yes"
invocations in a package with 5000 tests in the top-level directory
and other 5000 tests in a subdirectory. Here are the results,
averaged on a several runs:
+ Before this patch:
- "make all" 2.9 seconds
- "make recheck" 4.9 seconds
- "make check AM_LAZY_CHECK=yes" 18.1 seconds
+ After this patch:
- "make all" 2.7 seconds
- "make recheck" 3.9 seconds
- "make check AM_LAZY_CHECK=yes" 15.2 seconds
+ In mainline automake (commit v1.12-75-gd89da9c):
- "make all" 0.9 seconds
- "make recheck" 3.5 seconds
- "make check RECHECK_LOGS=" 14.1 seconds
So we still have a problem with "make all". That's due to performance
issues with the internal make function 'am__strip_suffixes', which will
be dealt with in a later patch.
Signed-off-by: Stefano Lattarini <address@hidden>
---
lib/am/check.am | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/am/check.am b/lib/am/check.am
index df2c40c..903dfc2 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -196,14 +196,18 @@ END { \
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
# This supports runtime overriding of $(TESTS) and $(XFAIL_TESTS).
-am__test_bases = $(call am__get_test_bases, $(TESTS))
-am__xfail_test_bases = $(call am__get_test_bases, $(XFAIL_TESTS))
+am__test_bases = \
+ $(call am__memoize,am__test_bases,$(call am__get_test_bases,$(TESTS)))
+am__xfail_test_bases = \
+ $(call am__memoize,am__xfail_test_bases,$(call
am__get_test_bases,$(XFAIL_TESTS)))
# The $(strip) is to work around the GNU make 3.80 bug where trailing
# whitespace in "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to
# erroneously expand to "foo.log .log".
-am__test_results = $(addsuffix .trs,$(strip $(am__test_bases)))
-am__test_logs = $(addsuffix .log,$(strip $(am__test_bases)))
+am__test_results = \
+ $(call am__memoize,am__test_results,$(addsuffix .trs,$(strip
$(am__test_bases))))
+am__test_logs = \
+ $(call am__memoize,am__test_logs,$(addsuffix .log,$(strip
$(am__test_bases))))
# $(TEST_LOGS) is a published interface.
TEST_LOGS = $(am__test_logs)
--
1.7.9.5
- [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, (continued)
- [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Stefano Lattarini, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Akim Demaille, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Stefano Lattarini, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Akim Demaille, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Stefano Lattarini, 2012/05/15
- Re: [Automake-NG] [PATCH 3/3] [ng] memoize: correctly work around a bug of GNU make < 3.83, Stefano Lattarini, 2012/05/16
- Re: [Automake-NG] [PATCH 0/3] Fix variable memoization, Akim Demaille, 2012/05/15
Re: [Automake-NG] [PATCH 00/11] Several changes to parallel-tests support, Bob Friesenhahn, 2012/05/09
[Automake-NG] [PATCH 0/2] Nice optimization for the parallel-tests harness, Stefano Lattarini, 2012/05/16
- [Automake-NG] [PATCH 1/2] [ng] check: memoize some internal vars (avoid useless recalculation),
Stefano Lattarini <=
- [Automake-NG] [PATCH 2/2] [ng] perf: optimize 'am__strip_suffixes' for speed, Stefano Lattarini, 2012/05/16
- Re: [Automake-NG] [PATCH 2/2] [ng] perf: optimize 'am__strip_suffixes' for speed, Stefano Lattarini, 2012/05/16
- Re: [Automake-NG] [PATCH 2/2] [ng] perf: optimize 'am__strip_suffixes' for speed, Akim Demaille, 2012/05/21
- Re: [Automake-NG] [PATCH 2/2] [ng] perf: optimize 'am__strip_suffixes' for speed, Bob Friesenhahn, 2012/05/21
- [Automake-NG] Avoding issues with command-line length limits (was: Re: [PATCH 2/2] [ng] perf: optimize 'am__strip_suffixes' for speed), Stefano Lattarini, 2012/05/22
- Re: [Automake-NG] Avoding issues with command-line length limits (was: Re: [PATCH 2/2] [ng] perf: optimize 'am__strip_suffixes' for speed), Akim Demaille, 2012/05/30
Re: [Automake-NG] [PATCH 0/2] Nice optimization for the parallel-tests harness, Stefano Lattarini, 2012/05/18