[packagekit] Questions for PK and future zypp backend development

Thomas Wood thomas at openedhand.com
Thu Jan 10 14:53:05 PST 2008


On Thu, 2008-01-10 at 15:09 -0700, Boyd Timothy wrote:
> Hey everyone,
[...]
> 
> 1) Stateless backends?
> 
> It appears that for almost every call, a new instance of zypp is
> instantiated.  This may not seem too bad, but the problem is that I'm
> having to do so much setup work in the first place to make even simple
> calls to find out information about a package.  Some of this is being
> worked on in libzypp right now, but I wondered if there's a better way
> to maybe persist or reuse a currently instantiated zypp backend.  I
> read through the discussion about the yum backend and it seems writing
> up my own caching scheme in the zypp backend might be a bad idea...but
> at least it would speed things up some and help keep state.

I would second this concern. For the Ipkg backend, the init procedure
has to read and parse all configuration files and set up the hash tables
for the package lists. If this is done every time a command is issued it
may cause serious performance issues on embedded devices. This can be
avoided with a few static variables to check for a previous init, but
it'd be nice to have some sort of consideration for this built into
PackageKit.

I also noticed that the PackageKit daemon calls backend_init when it
first starts up, but also on each subsequent command. Is there any
particular reason for this?

Regards,

Thomas

-- 
OpenedHand Ltd.

Unit R Homesdale Business Center / 216-218 Homesdale Road /
Bromley / BR1 2QZ / UK             Tel: +44 (0)20 8819 6559

Expert Open Source For Consumer Devices - http://o-hand.com/
------------------------------------------------------------




More information about the PackageKit mailing list