1 |
Joe Peterson wrote: |
2 |
> |
3 |
> No, I have not profiled PMs to try this, but you are saying that reading |
4 |
> the first few lines of a file is not faster than sourcing the whole |
5 |
> thing with bash? Remember that it could abort the minute it sees a non |
6 |
> '#' or blank line, which would be after the first few. |
7 |
> |
8 |
|
9 |
Actually, if you specified that the EAPI goes on the first line, then |
10 |
you'd only need to read the first line. |
11 |
|
12 |
And to the extent that the rest got read into memory anyway by the |
13 |
kernel, well then it is already in the cache when whatever mechanism is |
14 |
invoked to parse the rest of the file. |
15 |
|
16 |
I don't think that filename-vs-first-line is going to make a big |
17 |
difference in practical performance. Any time lost in determining EAPI |
18 |
would be time saved in parsing the file. And even though you could |
19 |
ignore unknown EAPIs, I think that in a typical case users would be |
20 |
using an up-to-date package manager that would just end up parsing |
21 |
everything all the time anyway. |
22 |
-- |
23 |
gentoo-dev@l.g.o mailing list |