[pacman-dev] When pacman reads local database files
Hello everyone, We have had some discussion about that local database and how it could be improved. I thought it would be useful to have a summary of what options touch what files in the local db: -R <pkg> all "desc" files single "files" file -S (something that installs a package...) all "desc" files single/multiple "files" files during package upgrades -Q stuff: -c <pkg> -> single "changelog" file per package -l <pkg> -> single "files" file per package -k <pkg> -> single "files/mtree" file per package -kk <pkg> -> single "mtree" file per package -d, -e, -g, -i, -m, -s, -t, -u all "desc" files -l, -o (, -k) all "files" files -c all "changelog" files -kk (, -k) all "mtree" files What can we conclude from this? 1) no operation reads a single "desc" file 2) -Qo is the only operation to gain from efficient reading of all "files" files. (-Ql may also gain, but is probably output bound) 3) having "desc" and "files" files separate and only loading these files if we need it is a gain. 4) all operations on mtree files require lots of disk access, so there is not much gain in increasing the efficiency of reading these. Allan
On Sun, Oct 23, 2016 at 11:37 AM, Allan McRae <allan@archlinux.org> wrote:
What can we conclude from this?
1) no operation reads a single "desc" file 2) -Qo is the only operation to gain from efficient reading of all "files" files. (-Ql may also gain, but is probably output bound) 3) having "desc" and "files" files separate and only loading these files if we need it is a gain. 4) all operations on mtree files require lots of disk access, so there is not much gain in increasing the efficiency of reading these.
It's pretty intuitive too, considering "desc" files cross reference other packages, while "files" is private to a package. It makes sense to group or link all "dest" files into a web, while "files" files are mostly isolated.
On 23/10/16 13:37, Allan McRae wrote:
Hello everyone,
We have had some discussion about that local database and how it could be improved.
I thought it would be useful to have a summary of what options touch what files in the local db:
-R <pkg> all "desc" files single "files" file
Correcting a mistake here. All "files" files are read in the case of trying to remove an empty directory. A
participants (2)
-
Allan McRae
-
lolilolicon