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 01:20:40AM +0200, Aleksey Cheusov wrote:
> > Hi Aleksey --
> >
> > I was using the show-var target as an example, make any target in
> > x11/gnome-control-center and it takes an equal amount of time to get
> > going.
> Ok. IIRC About year ago or so, Tobias Nygren tried to play with mmap(2)
> to optimize bmake.

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'll admit I haven't followed closely recent netbsd changes to pmake.
I know that, at one point, all the optimizations I had were making our
version of pmake 4 or 5 times faster than the original).

if you look at typical makefiles in the package infrastructures, there are
tons of comments, this could be a huge win.

a .includeonce directive would be harder to implement, because if you want
to even avoid the stat(), you have to implement some canonicalization of
the file names, which is not really easy...


Home | Main Index | Thread Index | Old Index