> Hello list, > > I have been investigating the slow performance of pacman regarding > the cold caches scenario and I'm trying to write some proof of > concept code that improves things a lot for some cases. However I > need your help regarding some facts I might have misunderstood, and > any pointers to the source code you also give me would also help a > lot. I wouldn't like to lose time changing stuff that would break > current functionality. So here are some first questions that come to > mind, just by using strace: > > When doing "pacman -Q blah" I can see that besides the getdents() > syscalls in /var/lib/pacman/local (probably caused by readdir()), > there are also stat() and access() calls for every single > subdirectory. Why are the last ones necessary? Isn't readdir enough? > > The same goes when doing "pacman -S blah". But in that case it > stat()'s both 'local' and 'sync' directories, so worst case is really > bad, it will stat() all contents of local, core, extra and > community... > > In the case of "pacman -S" I measured that a great deal of time goes > also to reading the "depends" files of all packages in local, please > enlighten me what this is for. I have thought of a new way to store > dependencies that should improve things, but I should first be sure > it doesn't break anything and get some measurements myself. depends files are read in order to ensure that the upgraded package won't break any "old" dependencies.
Example: local foo requires bar=2.0 (which is installed) Then "pacman -S bar" is not allowed (if bar in sync has different version). > > Thanks in advance, > Dimitris > > > P.S. Is there some option --pretend I might have missed? What I need > is to get exactly the same actions of "pacman -S blah" or "pacman > -Su" until the Y/N prompt, as non-root user. -Su is even worse: We have to read all desc files in sync (to get %REPLACES%) Bye
