[PATCH 3/5] Refactor: Use a doubly-linked list of rules instead of a singly-linked list

2007-02-25 Thread Mark Seaborn
--- implicit.c |2 +- rule.c | 86 +--- rule.h |7 +++-- 3 files changed, 41 insertions(+), 54 deletions(-) diff --git a/implicit.c b/implicit.c index d239952..82f2c79 100644 --- a/implicit.c +++ b/implicit.c @@ -301,7

[PATCH 1/5] Refactor: Move rule comparisons into separate functions

2007-02-25 Thread Mark Seaborn
--- rule.c | 95 +--- 1 files changed, 55 insertions(+), 40 deletions(-) diff --git a/rule.c b/rule.c index ee96ec1..d08383b 100644 --- a/rule.c +++ b/rule.c @@ -273,6 +273,34 @@ convert_to_pattern (void) } +static int

[PATCH 0/5] Improve performance of rule handling

2007-02-25 Thread Mark Seaborn
Here is a series of patches to improve make's performance in handling large numbers of pattern rules. The motivation is to make glibc's build process faster. The change speeds up adding new pattern rules, but it does not speed up finding pattern rules that match a given filename. I have not

[PATCH 2/5] Clean up count_implicit_rule_limits()

2007-02-25 Thread Mark Seaborn
* Removed unused variable, simplify loop. * Corrected comment. --- rule.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/rule.c b/rule.c index d08383b..a12f9d1 100644 --- a/rule.c +++ b/rule.c @@ -61,28 +61,24 @@ unsigned int maxsuffix; /* Compute

Re: multi-line commands with quoted SHELL

2007-02-25 Thread Paul Smith
On Thu, 2007-02-22 at 19:00 +0100, Petr Machata wrote: There is a bug tracked in Red Hat bugzilla http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219409 The problem is best demonstrated by this Makefile snippet: all:;@echo e\ cho With this make invocation, it works as

Re: glibc build process slowness

2007-02-25 Thread Paul Smith
On Wed, 2007-02-21 at 20:15 +, Mark Seaborn wrote: I profiled make. It's spending around 60% of the time in new_pattern_rule(), which does a linear search through the list of pattern rules to check for duplicate rules. glibc generates ~2500 rules (in sysd-rules). Holy moly! How in the