[packagekit] yum: being naughty with SQL

seth vidal svidal at redhat.com
Wed Jul 2 09:41:09 PDT 2008


On Wed, 2008-07-02 at 17:13 +0100, Richard Hughes wrote:
> Today I spend a bit of time profiling yum and PackageKit to see why
> things take so long to select different groups in gpk-application.
> 
> The old:
> 
> [hughsie at hughsie-work helpers]$ time ./search-group.py none games
> real	0m14.899s
> user	0m14.520s
> sys	0m0.277s
> 
> The new:
> 
> [hughsie at hughsie-work helpers]$ time ./search-group.py none games
> real	0m1.050s
> user	0m0.867s
> sys	0m0.114s
> 
> See https://bugzilla.redhat.com/show_bug.cgi?id=453356 for all the gory
> details. It basically involves accessing the yum database directly using
> sqlite, rather than using yum itself. Patch attached for review,
> comments welcome.
> 
> I know accessing the database without using yum is bad, but we are only
> reading it rather than changing anything. Yell if you have reservations
> about doing this, or anything else we can try.

You're not getting excludes, incompatible arches, repository or yum
config settings of any type in the process if you go directly to the
sqlite. The excludes alone can be expensive.

where does search-group.py? In pk? I'll see what I can come up with for
the difference.

thanks,
-sv





More information about the PackageKit mailing list