Skip to content
Commit 8e31b0f0 authored by Morten Hustveit's avatar Morten Hustveit Committed by Guillem Jover
Browse files

dpkg: Use FIEMAP to sort .list files before scanning



When running dpkg from a cold cache on a system where <admindir>/info/
lies on a hard disk, a lot of time is spent waiting for seeks between
(typically) thousands of files. This patch changes the behavior of
ensure_allinstfiles_available(), so that it accesses the packages in
the order of their .list files' physical locations on the hard disk,
greatly reducing drive head movements.

The performance improvement is around 70% on my system: reinstalling
a simple package takes 8 seconds instead of 27 seconds. The caches were
dropped before each run, and 10 runs were done with consistent results.
The performance is identical to the previous patch using FIBMAP,
althought this one has the advantage of not needing root privileges.

Signed-off-by: default avatarGuillem Jover <guillem@debian.org>
parent b3ffabc0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment