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