Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, "M. J. Everitt" <m.j.everitt@×××.org>
Subject: Re: [gentoo-portage-dev] [PATCH] Rewrite doins in python (bug 624526)
Date: Mon, 14 Aug 2017 20:31:56
Message-Id: b6950dc4-0795-1817-7d85-13db5c353002@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] Rewrite doins in python (bug 624526) by "M. J. Everitt"
1 On 08/14/2017 12:49 PM, M. J. Everitt wrote:
2 > On 14/08/17 08:39, Zac Medico wrote:
3 >> From: Hidehiko Abe <hidehiko@××××××××.org>
4 >>
5 >> doins is written in bash. However, specifically in case that
6 >> too many files are installed, it is very slow.
7 >> This CL rewrites the script in python for performance.
8 >>
9 >> BUG=chromium:712659
10 >> TEST=time (./setup_board --forace && \
11 >> ./build_package --withdev && \
12 >> ./build_image --noenable_rootfs_verification test)
13 >> ===Before===
14 >> real 21m35.445s
15 >> user 93m40.588s
16 >> sys 21m31.224s
17 >>
18 >> ===After===
19 >> real 17m30.106s
20 >> user 94m1.812s
21 >> sys 20m13.468s
22 >>
23 > I know I'm gonna get chewed out on this one, but here goes anyway ...
24 >
25 > Surely for a package like chromium, who's build time is already in the
26 > 'hours' range anyway, surely a couple of minutes gain for the install
27 > phase is neither here nor there?! If there were some genuine filesystem
28 > iop gains/etc for this change, I think I'd likely support it further ..
29
30 It's going to reduce time, power consumption, and heat generation for
31 all portage users. Also, we can use portage.util.file_copy to optimize
32 it further with zero-copy, reflink, and sparse file support.
33
34 > On this basis, what do the performance differences look like on an
35 > 'average' package
36
37 Well, it's very inefficient to fork/exec the install command for many
38 files as the existing bash implementation does. The performance
39 difference is related to the number of files.
40
41 > .. and are there any regressions in this regard?!
42
43 It's supposed to fallback to calling the install command if there are
44 any unrecognized options, so the intention is for 100% compatibility.
45
46 > I take issue with the copyright assignment, as I believe the legal ..
47 > err .. IANAL devs are campaigning for full rights to be owned and
48 > enforced by Gentoo Inc LLC in the US .. even if they have no idea what
49 > that means or does .. :]
50
51 Since it's a BSD-style license, we can copy the code into our project as
52 long as we retain the copyright notice.
53 --
54 Thanks,
55 Zac

Replies