tech-pkg archive

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

Re: pkgsrc performance



On Thu, Feb 26, 2009 at 09:22:08AM +0100, Joachim König wrote:
> Quentin Garnier wrote:
>> It's an orthogonal issue.  The problem here is bl3.mk files including
>> other bl3.mk files.  What you describe is essentially changing a
>> recursive algorithm into an iterative one;  that doesn't solve the issue
>> here which is to know what information can be discarded when discovering
>> dependencies.
> I did not want to change the algorithm to an iterative one, the only

Of course you do.  How do you think you'll use that BUILDLINK3_DEPENDS
variable, but with a .for loop?  Recursion isn't something bl3 invented.

> thing I wanted to achieve was the decoupling of dependency declaration
> and the actual inclusion based on the following observation:
>
> It's only necessary to actually include a buildlink3.mk at most twice:
>
> - if it's a direct dependency include it at "level 0"
> - if it's an indirect dependency include it at a "level > 0"

No.  With the iterative way you propose, bl3.mk files would only need to
be included once, *either* as direct dependencies or later as indirect
dependencies.

>> That said, your approach is interesting;  it would centralize the code
>> where it is decided whether or not to go on with the discovery, instead
>> of using .if !defined() blocks.  But it would still require changing all
>> bl3.mk files, so the amount of work is at least equivalent.
> What I propose could be done by a simple mechanical transformation of  
> all the
> '.include "../../<category>/<pkgname>/buildlink3.mk"' to a variable  
> assignment like
> "BUILDLINK3_DEPENDS += <category>/<pkgname>" and some additions
> to the dependency infrastructure to recursively include the  
> buildlink3.mk files
> conditionally.

No, you'd have to clean up the bl3.mk files of all conditionals, too.
And it wouldn't necessarily be as simple as just adding to
BUILDLINK3_DEPENDS, because yu will have to somehow keep track of all
the ones you've already processed.

So anyway, I'm pretty sure I've understood what you propose, so you'll
have a hard time convincing me of the contrary.  I stand by my opinion
that it is an orthogonal issue, and you're welcome to have a try at it.
There's a chance it might give better results, and that way it might be
easier to include buildlink information that would be embedded in binary
packages, to avoid those issues when an installed package is not deemed
sufficient by all dependencies.

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgp0lZwjKzpV4.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index