Hi!
Let's clarify this ;-)
The database is in PK and therefore generic, it can be used by every
other tool too. The Xapian database you mentioned is the AppStream DB
with application data and the packages in which the application is, it
does not contain other data. (well, not entirely true, but that's the
most important part)
Now the SC needs to query certain information from PK, e.g. if a
package is already installed or the description of a package to
display it.
Problem here is that you can't run thousands of Resolve() calls on
PackageKit, as this is very slow and there's no chance to optimize it.
Also, all data has to go through DBus, which slows down the process
too.
Solution was to first optimize these calls, which is done already.
Unfortunately, if a transaction is running you also can't spawn
another one, so e.g. while you're installing Foo you can't view the
details page for Bar.
We now use the SQL cache to query this information async and very
fast, without DBus.
I'm not 100% happy with this solution, but it's the best we have at
time. I first suggested to avoid the DBus trip and cache-reopen-run by
linking the PackageKit access libraries directly against PK backends,
so we would be able to access the cache directly for read actions, but
this idea was rejected upstream.
We're preparing some other solutions there anyway, but nothing as fast
as a cache would be, unfortunately.
I hope this clear things up :)
Cheers,
Matthias
2012/6/4 Michael Schroeder
Hi!
On Mon, Jun 04, 2012 at 11:45:44AM +0200, Matthias Klumpp wrote:
In the last two weeks, I discussed all these issues with Richard Hughes, the PackageKit maintainer. I wrote a prototype of a SQLite based package-cache, which will make querying data super-fast and will make it possible to do this in parallel to PK transactions. First, the cache was super-slow, but with some optimizations in PkPackageSack routines, it now runs with acceptable speed so we can use it.
Hmm, I don't understand this. Is this sqlite database in PK or in SC? If it's in SC, I don't see why you need it as SC puts everything in its xapian database anyway. And I don't see why PK would need it, as libzypp has its down database to query.
Confused, Michael.
-- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
-- To unsubscribe, e-mail: opensuse-project+unsubscribe@opensuse.org To contact the owner, email: opensuse-project+owner@opensuse.org