[Yum-devel] speeding up searchNevra in rpmsack
pnasrat at redhat.com
Thu Oct 12 17:33:51 UTC 2006
On Thu, 2006-10-12 at 13:02 -0400, Jay Soffian wrote:
> 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?
> import rpm
> for num in range(1, 1200):
> ts = rpm.TransactionSet()
> print num
> mi = ts.dbMatch(0, 20)
> h = mi.next()
> del h
> del mi
> del ts
Thanks for the investigation, this makes sense.
More information about the Yum-devel