Gentoo Archives: gentoo-dev

From: Nicholas Jones <carpaski@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Subcategores and a C comment
Date: Mon, 04 Oct 2004 15:58:57
Message-Id: 20041004155853.GA7677@twobit.net
In Reply to: Re: [gentoo-dev] Portage Subcategory Capabilities? by Luke-Jr
1 > What's this I've heard about Portage's performance not being a
2 > real issue? (argument for not rewriting it in C/etc)
3
4 (Directed at individuals that persist in making such commentary:)
5
6 STOP SUGGESTING THAT until you know why it's rejected. Tree walking
7 will, at no reasonable level, be faster. DiskIO is a bound and there
8 is no direct way to make it faster in C, asm, or python. The only
9 realistic benefit of C would be algorithmic... and there is no problem
10 there except for searches. Any benefits beyond this incur a MASSIVE
11 testing and QA requirement because of the lower-level code involved.
12 You would not see nearly the changes and quickness in fixes if portage
13 were in C and I highly doubt anyone wants to diagnose segfaults on
14 a users box. Copy and pasting exceptions reduces debugging time by
15 leaps and bounds. 'Please run gdb on portage after recompiling your
16 system with frame pointers and debug information.' </rant>
17
18 Short version: C is my prefered language, what I code in at work,
19 and I think it's completely wrong for portage and wide deployment
20 of an actively changing system such as portage. It's more important
21 for portage to work than to be blazingly fast.
22
23 Any WELL THOUGHT argument or research should be taken to the
24 gentoo-portage-dev mailing list.
25
26 >> 2) how will Portage know the difference between a package
27 >> and another sub-category when it is walking the tree?
28
29 Categories file is easy enough to employ.
30
31 >> 3) the many additional directories would cause an 'emerge sync'
32 >> to take longer than it does now.
33
34 It would, but not as much as the thousands of ebuilds and
35 supporting files that get added to daily.
36
37 > should finally implement fetch-on-demand...
38
39 So instead of a sync connection and update, we can trade off a
40 complete tree for 1-to-N connections, comparisons, and fetches.
41
42 I'd recommend passing this through infra to make sure that
43 causing an extra N-times the connections is reasonable.
44
45 Also, you potentially cause the mirror to reject you as there
46 could be a great deal more competition on any given mirror.
47 Portage would be forced to add logic to repeatedly poll for a
48 free connection once it has started. If you get stuck behind
49 Dialup users, you could very well be there a while. Basically,
50 it can cause a race condition against servers.
51
52 >> Basically, you'd be pissing everyone off with little benefit
53 >> (except maybe to developer sanity).
54
55 It's not that bad really. But portage internals make a lot of
56 assumptions about the directory structure which is why we have
57 yet to make any attempt at this yet. It should become feasable
58 some time after 2.0.51 becomes stable and we branch for the
59 ripping apart of the internals.
60
61 --NJ

Replies

Subject Author
Re: [gentoo-dev] Subcategores and a C comment Luke-Jr <luke-jr@×××××××.org>
Re: [gentoo-dev] Subcategores and a C comment Paul de Vrieze <pauldv@g.o>