[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 0/3] speed up apt-get startup by ~19%



Hi,

On Sat, Jan 25, 2014 at 03:27:42AM +0100, Jann Horn wrote:
> These are patches that should apply to the sid branch of
> git://anonscm.debian.org/apt/apt.git – I hope that this is the right way to
> do this?

Sure, that is fine. If you have a branch of your own you can also point
us into the general direction of it if you like. :)


> These patches reduce the startup time of apt-get by ~19% on my system. I
> measured by first doing "apt-get source sl", then running this command:
[…]

Do you have any special reason to pick this command?
I forgot to remove the binary caches at first, which caused me to see no
meaningful difference, but maybe my machine is just too quick¹.

Removing both caches shows the difference through (for me ~10%, but in a
5 second run, so this is very close to your results).
I checked with "apt-get check -s" as this just generates the caches (in
memory if run as user) and does the dependency walk which is run by the
other apt-get commands as basic setup.

(¹ that I would ever be able to say that…)


> What do you think? Rewriting the whole source like this would probably make it
> much uglier, but IMO optimizing a few hot code paths this way should be fine.

Did you tried it with some sort of tool or just by "guessing"?
We had a while back similar improvements with our own tolower
reimplementation, so as long as speedups are observable and are
not to crude I have no problem with adding them.

(Will follow up on the patches itself in a second)


Best regards

David Kalnischkies

Attachment: signature.asc
Description: Digital signature


Reply to: