Gentoo Archives: gentoo-dev

From: Matthias Maier <tamiko@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Portage dependency solving algorithm
Date: Fri, 07 Nov 2014 18:54:51
Message-Id: yxcd28yn8ni.fsf@tethys.iwr.uni-heidelberg.de
In Reply to: Re: [gentoo-dev] Portage dependency solving algorithm (WAS: Regarding my final year thesis) by Ciaran McCreesh
1 Am 07. Nov 2014, 19:30 schrieb Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>:
2
3 > On Fri, 07 Nov 2014 19:11:04 +0100
4 > Jauhien Piatlicki <jauhien@g.o> wrote:
5 >> Then the same question for you: where can one read about the algorithm
6 >> Paludis uses?
7 >
8 > It's basically a two stage process: simple constraint solving using
9 > value ordering heuristics to enforce "don't do unnecessary work", then
10 > ordering (which is not quite a graph process, and which is not as
11 > simple as a topological sort, because the tree is full of circular
12 > dependencies).
13 >
14 > But the interesting question isn't "what's the algorithm?", it's
15 > "what's the model?". That's where the complexity lies: figuring out how
16 > to turn *DEPEND specifications into constraints is an utter pain, and
17 > it isn't clean or easily understandable. The primary reason is ||
18 > dependencies: developers like to write not-really-correct and utterly
19 > unobvious dependency strings rather than asking for new syntax so they
20 > can just say what they mean...
21
22
23 Currently, for portage just to decide that nothing has to be done on my
24 machine takes around 1 minute.
25
26 What is in your opinion the main reason for this? And how can we knock
27 this down to reasonable speed?
28
29 - Is our dependency model that more complex than the problem resolvers
30 of other package managers for other distributions solve?
31
32 - Is it the algorithm that is implemented for the dependency model?
33
34 - Is it its implementation?
35
36
37 >> And, again, I have herd (did not try myself) that Paludis is as slow
38 >> as Portage.
39 >
40 > Well, you're not comparing like with like. Paludis with "everything
41 > turned off" does more than Portage with "everything turned on". If all
42 > you're looking for is the wrong answer as fast as possible, there are
43 > easier ways of getting it...
44
45 The last time I compared the resolver speed of portage and paludis both
46 needed almost the same time.
47
48 Do you have a speed comparison with a similar feature set of both? (Or,
49 alternatively, the speedup one gains by tuning paludis to be as fast as
50 possible).
51
52 Best,
53 Matthias

Replies

Subject Author
Re: [gentoo-dev] Portage dependency solving algorithm hasufell <hasufell@g.o>
Re: [gentoo-dev] Portage dependency solving algorithm Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>