tech-pkg archive

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

Re: make performance, low-hanging fruits

On Sat, Jan 14, 2012 at 03:30:54PM +0100, Marc Espie wrote:
> *if you manage to rewrite make*, that would be interesting.
> In the mean time, you should be aware I did a lot of performance
> tweaks in OpenBSD a few years ago.

I got a massive improvement in the parser a few years ago by reading
chunks of 'file' and separating out into lines (rather than a getchar()
loop). DH has since change it to use mmap() - I didn't bother because
it dirties most of the pages.

(Done because of the way pkgsrc repeatedly rereads makefiles.)

I fixed the .if processing at the same time. The .for processing
is somewhat problematical I changed the loop variable substitutions
into ${:U<text>}, but I think that should only be done when lines
are saved for pass 2 (ie command lines) - that would remove more
of the 'unexpected' behaviour of loop variables.

I think here might be a memory leak in the 'find something to run'
path - The original attempt to have a 'tree' and select the leaves
just didn't work, and I think it currently chews through the 'do to'
nodes. If you watch (I think) libc being made you see a very large
(and growing) make image .

Unfortunately I've beed right out of 'round tuits' for a couple of years.


David Laight:

Home | Main Index | Thread Index | Old Index