Re: CVS commit: src/usr.bin/make

2016-06-03 Thread Joerg Sonnenberger
On Fri, Jun 03, 2016 at 01:21:59AM +, Simon J. Gerraty wrote:
> Module Name:  src
> Committed By: sjg
> Date: Fri Jun  3 01:21:59 UTC 2016
> 
> Modified Files:
>   src/usr.bin/make: main.c make.h meta.c nonints.h var.c
> 
> Log Message:
> Add cached_realpath()
> 
> realpath(3) is expensive, and meta mode at least uses it extensively.
> We use cached_realpath() to save the result of successful calls to
> realpath(3) in a private variable context.
> 
> This improves the worst case performance (eg examining libc with
> nothing to do) by a factor of 4.

...except now build.sh on !NetBSD fails immediately due to missing
strlcpy.

Joerg


Re: CVS commit: src/usr.bin/make

2016-06-03 Thread Christos Zoulas
In article <20160603012159.a51b6f...@cvs.netbsd.org>,
Simon J. Gerraty  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  sjg
>Date:  Fri Jun  3 01:21:59 UTC 2016
>
>Modified Files:
>   src/usr.bin/make: main.c make.h meta.c nonints.h var.c
>
>Log Message:
>Add cached_realpath()
>
>realpath(3) is expensive, and meta mode at least uses it extensively.
>We use cached_realpath() to save the result of successful calls to
>realpath(3) in a private variable context.
>
>This improves the worst case performance (eg examining libc with
>nothing to do) by a factor of 4.

I forgot to ask if it is worth it to cache the misses too...

christos