Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 00/10] First steps to get rid of backtracking
Date: Sun, 02 Feb 2014 20:46:06
Message-Id: 20140202124147.4983c690@big_daddy.dol-sen.ca
In Reply to: [gentoo-portage-dev] [PATCH 00/10] First steps to get rid of backtracking by Sebastian Luther
1 On Wed, 29 Jan 2014 16:33:04 +0100
2 Sebastian Luther <SebastianLuther@×××.de> wrote:
3
4 > Hi all,
5 >
6 > as you may have noticed, emerge can in some cases take ages ( >5-10
7 > minutes) to resolve dependencies these days. This happens when lots
8 > of backtracking is required to solve slot conflicts and/or to
9 > schedule slot operator rebuilds. The problem is that the current
10 > backtracking implementation has to rebuild the entire dependency
11 > graph from scratch each time it backtracks.
12 >
13 > This series of patches is a first step into fixing this problem.
14 >
15 > What these patches do:
16 > Patch 1
17 > -------
18 > Adds a new data structure called package_tracker. This data
19 > structure is meant to replace several of the depgraph data structures.
20 > It has some new features not present in the existing data
21 > structures. 1) It can properly deal with several packages in the same
22 > slot. 2) It supports removal of previously added packages.
23 > 3) It tracks package conflicts automatically.
24 > 4) It has a more general concept of conflicts.
25 >
26 > Not all of the features are used for now, but they will make
27 > future changes easier.
28 >
29 > Patch 2-5
30 > ---------
31 > These patches replace the old data structures with the
32 > package tracker
33 >
34 > Patch 6-8
35 > ---------
36 > These patches fix several issues with emerge output. 6 and 8
37 > are somewhat independent of the other patches in this series. Patch 7
38 > introduces a new function used in Patch 10.
39 >
40 > Patch 9
41 > -------
42 > New function for patch 10.
43 >
44 > Patch 10
45 > --------
46 > This patch builds on top of all the previous patches. It
47 > introduces two new functions to the depgraph class. A function to
48 > remove packages that have previously been pulled in and a function to
49 > solve simple slot conflicts without backtracking.
50 >
51 > This should resolve most "no parents that aren't satisfied by
52 > other packages in this slot" slot conflicts.
53 >
54 > You may find these patches on github here:
55 > https://github.com/few/fews-portage-branch/tree/package_tracker
56 >
57 > Some numbers
58 > ------------
59 >
60 > My system has quite a number of conflicts that give emerge a hard time
61 > resolving dependencies.
62 >
63 > -uDN world
64 >
65 > Without the patches:
66 > * 11 unsolved slot conflicts
67 > * 2 unsolved blockers
68 > * takes 5 backtracking steps and then fails
69 >
70 > With the patches:
71 > * no unsolved slot conflicts or blockers
72 > * takes 7 backtracking steps and then succeeds
73 >
74 > In this case it actually became slower, but was finally able to find
75 > a solution.
76 >
77 > -e world
78 >
79 > Without the patches:
80 > * 5 unsolved slot conflicts
81 > * 1 unsolved blocker
82 > * takes 23 backtracking steps and then fails
83 >
84 > With the patches:
85 > * 1 unsolved slot conflict (From a quick look it looks like
86 > there really is no solution.)
87 > * takes 13 backtracking steps and then fails
88 >
89 > In this case it's a lot faster, but still unacceptably slow.
90 > The result is improved by solving 4 out of 5 conflicts.
91 >
92 >
93 >
94
95 I'm replying to all the series. I saw no glaring obvious mistakes.
96
97 This code is in areas I know little about, but your changes do seem
98 logical. Your additional fixes to these patches also look good.
99
100 If Mike/Arfrever gives the thumbs up. They're good to go in my opinion.
101
102 --
103 Brian Dolbec <dolsen>

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH 00/10] First steps to get rid of backtracking Sebastian Luther <SebastianLuther@×××.de>