-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-09-16 07:29, 1xx wrote:
Can we resolve this issue from RPM or Berkeley DB? (This issue = "rpm -qa" are slow in some environments)
Just add this code before calling it: cp /var/lib/rpm/Packages /dev/null cp /var/lib/rpm/Basenames /dev/null cp /var/lib/rpm/Providename /dev/null cp /var/lib/rpm/Requirename /dev/null (which is a hack, but one that just works) The other proposed solutions mean recoding rpm itself, or whatever library manages the databases. Something like that should be done, but it is not something you can do if you are not an rpm developer ;-) And the code should check for installed memory in the machine, or be optional with a config option or switch. Just parse this output: Telcontar:/etc/init.d # grep MemTotal /proc/meminfo MemTotal: 8193508 kB Telcontar:/etc/init.d # and make a decision beyond a certain size. Otherwise, you could consider using "rpmqpack" instead of "rpm -qa", if you do not need versions. About rpm or database coding, Cristian suggested opening the database file with «fopen(3) with "m" mode.. or mmap()». - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlQYJoMACgkQtTMYHG2NR9VTaQCffCUSgQZNa8oWf/05BwqnSnvw l7kAoJIpn5Ly9htZneNeDTF9/IDmGnFf =2e4x -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org