On 2/28/07, Nagy Gabor <ngaba@petra.hos.u-szeged.hu> wrote:
Hi! It's common practise that you load pkgcache with INFRQ_DEPENDS or similar which is slow, because you must read the whole db directory. Instead it would be more optimal, if you'd load db_cache with INFRQ_NONE almost always (in case of thransactions where only few packages are affected), because that is very fast (name and version are computed from the directory name, so you need to read only the root directory of the repo). And if you find the required package by name, you can read the required info. So first _alpm_db_scan with INFRQ_NONE then _alpm_db_read
We already went over this before. In the future, all package access will be done with the accessor functions, loading the individual files on demand.