1 |
On 00:10 Sat 06 Dec , Aron Griffis wrote: |
2 |
> Bob Miller wrote: [Fri Dec 05 2003, 01:46:10PM EST] |
3 |
> > Second, is there anything wrong with Python as an implementation |
4 |
> > language? If you think Python is too slow, think again. On nearly |
5 |
> > every portage operation I do, the CPU is mostly idle -- it's the disk |
6 |
> > that's thrashing (according to gkrellm). The key to improving |
7 |
> > portage's performance is to get it to open fewer files. |
8 |
> |
9 |
> Sort of. It's true that there's a lot that could be done to improve |
10 |
> portage performance without changing languages. Nonetheless, even the |
11 |
> smallest test shows that python has a poor startup time. |
12 |
> |
13 |
> $ time python -c 'print "hi"' |
14 |
> user 0m0.023s |
15 |
> sys 0m0.004s |
16 |
> |
17 |
> $ time perl -e 'print "hi\n"' |
18 |
> user 0m0.003s |
19 |
> sys 0m0.003s |
20 |
[...] |
21 |
|
22 |
I'd like to point out that that start up time is negligible -- especially since |
23 |
type typical emerges aren't going to be hindered by a less than one half second |
24 |
start up time. Part of the reason I am working on modularisation of portage is |
25 |
that you don't have to pull 5000 lines of python code along with a 50 line |
26 |
utility script. |
27 |
|
28 |
Also, if a bash script is feeling a hit from constantly reloading the portage |
29 |
library, it probably needs to be rewritten in python. |
30 |
|
31 |
-- |
32 |
-------------------------~ |
33 |
----------Jason-A-Mobarak-~ |
34 |
-aether-at-gentoo-dot-org-~ |
35 |
-------------------------~ |
36 |
|
37 |
|
38 |
-- |
39 |
gentoo-dev@g.o mailing list |