Gentoo Archives: gentoo-dev

From: Alastair Tse <liquidx@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] portage-ng concurse entry Was: Updated Portage project page
Date: Sat, 06 Dec 2003 08:24:16
Message-Id: 1070720644.15032.20.camel@huggins.eng.cam.ac.uk
In Reply to: Re: [gentoo-dev] portage-ng concurse entry Was: Updated Portage project page by Aron Griffis
1 On Sat, 2003-12-06 at 05:10, Aron Griffis wrote:
2 > Sort of. It's true that there's a lot that could be done to improve
3 > portage performance without changing languages. Nonetheless, even the
4 > smallest test shows that python has a poor startup time.
5 >
6 > $ time python -c 'print "hi"'
7 > user 0m0.023s
8 > sys 0m0.004s
9 >
10 > $ time perl -e 'print "hi\n"'
11 > user 0m0.003s
12 > sys 0m0.003s
13
14 True, in fact python-2.3 is even worse at startup times.
15
16 However, that python startup time is negligible compared to calling
17 "import portage" where it loads the portdb from disk. For instance, the
18 newest portage calls portageq continuously, and every instance of it
19 does "import portage" which is really slow on my machine. When I say
20 slow, that is a bit more than 2 seconds (5 seconds before disk cache).
21 But if it runs that for every package I have in world, then that is
22 461*2 ~ 920seconds just for calling "import portage".
23
24 Oh, and just for comparison:
25
26 mcvaio work # time python -c 'print "hi"'
27 hi
28 real 0m0.244s
29 user 0m0.107s
30 sys 0m0.029s
31
32 mcvaio work # time perl -e 'print "hi\n"'
33 hi
34 real 0m0.046s
35 user 0m0.007s
36 sys 0m0.008s
37
38 (after a couple of runs)
39
40 That is with python-2.3.2 and perl-5.8.2.
41
42 Anyway, I've ventured far enough off topic here. I personally think
43 speed is only one small factor in determining what portage-ng would use,
44 more so for startup speed as well.
45
46 Cheers,
47 --
48 Alastair 'liquidx' Tse
49 >> Gentoo Developer
50 >> http://www.liquidx.net/ | http://dev.gentoo.org/~liquidx/

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies