Making pkgsrc faster

From NetBSD Wiki

Jump to: navigation, search

Over time, pkgsrc has become really slow. To see the difference, you can download pkgsrc as of the year 2000 and build some simple packages with it. It's exciting how fast it had been once.

To get back some of the speed, here are some ideas that may be helpful. When implementing these, take care that you don't make it more complex than necessary, since pkgsrc is already complex enough.

Contents

Speeding up the buildlink3 wrapper

Currently, for each file of a package that is created in the .buildlink directory, at least one process is started (ln -s). The functionality could be moved into a little C program to get rid of the many calls to external programs.

Speeding up the buildlink3 dependencies

The buildlink3.mk files currently include each other multiple times. I don't think that is necessary. Johnny said, the order of inclusion was important, but either he didn't tell me why or I have forgotten it since then.

Anyway, if every file would be loaded only once, that will definitely save some time.

It is also interesting whether a redesign of the buildlink3 dependency files could be done, so that they don't need those multiple-inclusion things and therefore can get a lot shorter.

Speeding up the compiler wrapper

The large sed(1) files transform.sed and untransform.sed are frightening. They may also slow down the compiler wrappers as soon as they are used to transform the command lines arguments.

See also

Personal tools