Subject: Re: some recent make(1) change makes it horribly slow
To: Tobias Nygren <tnn@NetBSD.org>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 10/12/2007 22:23:27
On Fri, Oct 12, 2007 at 09:52:36PM +0200, Tobias Nygren wrote:
> On Fri, 12 Oct 2007 17:12:58 +0200
> Matthias Drochner <M.Drochner@fz-juelich.de> wrote:
> 
> > 
> > Hi -
> > I just updated my system to -current, and now make(1) spent
> > more than 20 minutes after an invokation (in pkgsrc) eating
> > up CPU time before doing any visible work.
> > I've reverted my src/usr.bin/make/* to 2007/10/01 22:14:11,
> > and now it takes "just" two minutes for the same.
> > Whoever did this, please fix.
> > 
> Here's profiling information from today's make(1) versus 20070901
> when running "make show-var VARNAME=PKGNAME" in x11/gtk2:

> current:
>   %   cumulative   self              self     total
>  time   seconds   seconds    calls   s/call   s/call  name
>  45.50      1.67     1.67     6209     0.00     0.00  strstr
>  16.35      2.27     0.60                             L2
>  12.53      2.73     0.46 39799019     0.00     0.00  strncmp
>   7.63      3.01     0.28                             L3
>   3.00      3.12     0.11   302504     0.00     0.00  sstep

A quick inspection makes me think the strstr() calls are down
to code inside ParseTrackInput() called from Parse_SetInput().

Parse_SetInput() gets called a lot of times (eg for each iteration
of a for loop).

I'm not sure whether all the strncmp() calls are associated.

	David

-- 
David Laight: david@l8s.co.uk