bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] maint.mk: speed up require_config_h_first


From: Ján Tomko
Subject: Re: [PATCH 3/4] maint.mk: speed up require_config_h_first
Date: Mon, 1 Aug 2016 14:14:24 +0200
User-agent: Mutt/1.5.24 (2015-08-30)

On Sat, Jul 30, 2016 at 01:26:01PM -0700, Jim Meyering wrote:
On Tue, Jul 26, 2016 at 7:28 AM, Ján Tomko <address@hidden> wrote:
Instead of spawning three processes per file, rewrite the check
in perl and run it once for all the files.
---
Alternatively, grep --max-count 1 could help with getting rid of
the per-file commands and extra sed, but I don't know if it's
portable enough.

 ChangeLog    |  7 +++++++
 top/maint.mk | 25 ++++++++++++++++++-------
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b698a6c..64e2026 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2016-07-26  Ján Tomko  <address@hidden>

+       maint.mk: speed up require_config_h_first
+
+       Instead of spawning three processes per file, rewrite the check
+       in perl and run it once for all the files.

Thank you. Nice patch.
I've made some small changes and am ready to push this, but will wait
to hear from you.

From dce9706ee7661229bde91ee2e2357b68ffe68c7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <address@hidden>
Date: Tue, 26 Jul 2016 16:28:16 +0200
Subject: [PATCH] maint.mk: speed up require_config_h_first

Instead of spawning three processes per file,
rewrite the check in perl and run it once for all the files.
* top/maint.mk (perl_config_h_first_): Define.
(sc_require_config_h_first): Use it in place of shell code.
---
ChangeLog    |  8 ++++++++
top/maint.mk | 23 ++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)


This also looks good to me.

And for completeness, my speedup for this test on libvirt code base is
from 0.87s to just 0.2s. For the prohibit_doubled_word test it's 1.65s
to 0.68s.

Jan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]