[Yum-devel] speeding up searchNevra in rpmsack
Jay Soffian
jay-yum-devel at soffian.org
Thu Oct 12 17:02:34 UTC 2006
On Oct 12, 2006, at 12:16 AM, seth vidal wrote:
> The only way I could find to not make that happen when working on
> searchNevra is to open a ts and keep it open. Which, of course, breaks
> ctrl-c handling.
So if you delete the match iterator this also goes away. Which makes
sense I think... even tho you're calling ts.close(), the database
can't be closed cause you're still holding a reference to something
in the database?
Anywho:
import rpm
for num in range(1, 1200):
ts = rpm.TransactionSet()
ts.openDB()
print num
mi = ts.dbMatch(0, 20)
h = mi.next()
del h
del mi
ts.closeDB()
del ts
I confirmed that is no longer leaking FD's.
j. - sorry for the barrage.
More information about the Yum-devel
mailing list