tech-pkg archive

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

Re: pkgsrc performance



On Wed, Feb 25, 2009 at 05:52:01PM +0100, Marc Espie wrote:
> 
> In OpenBSD, I speeded up make by a factor of 2 or more by a few simple
> optimizations.
> - if you're on a platform with fgetln, use it instead of fgets... removes
> a lot of copying.
> - refactor the code to handle comment lines earlier, so that you can
> skip them entirely very early before reading anything.

I refactored all the file reading, comment stripping and .if
handling a year or two ago.
Made an absolutely massive difference!

Doesn't use fgetln or mmap - the latter because the parser is destructive.
The general idea is probably similar to that of fgetln.

        David

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


Home | Main Index | Thread Index | Old Index