[packagekit] Dynamic Groups in Packagekit

Tim Lauridsen tim.lauridsen at googlemail.com
Fri Sep 26 07:45:44 PDT 2008


Richard Hughes wrote:
> On Fri, 2008-09-26 at 12:33 +0200, Tim Lauridsen wrote:
>> i have 2 new API method:
>> GetCategories()         : Get collection categories from backend.
>> GetCollections()        : Get collections from backend
>>
>> And 2 new signals:
>> Category:
>>    cat_id       : category id (fx. apps)
>>    name         : Category name
>>    summary      : Category description
>>    icon         : path to icon for category on locale system.
>>
>> Collection:
>>    grp_id       : group id with '@' prefix (ex. @kde-desktop)
>>    cat_id       : category id (fx. apps)
>>    name         : Translated collection name
>>    summary      : Translated collection description
>>    icon         : path to icon for collection on locale system.
> 
> I'm worried about the round trip time when a client requests the group
> list. Think what happens when the client starts up:
> 
> GetCategories()
> Category 1
> Category 2
> Category 3
> Category 4
> Category 5
> Category 6
> Category 7
> Category 8
> GetCollections(1)
> Collection 1
> Collection 2
> Collection 3
> Collection 4
> Collection 5
> GetCollections(2)
> Collection 1
> Collection 2
> Collection 3
> Collection 4
> Collection 5
> GetCollections(3)
> Collection 1
> Collection 2
> Collection 3
> Collection 4
> Collection 5
> 
> etc.
> 
> If each RTT is about 50ms, and it's N squared complexity, it's a lot of
> time. To approximate, if there are 10 categories, it'll take nearly a
> second just to get the group list.
> 
> Why couldn't this be done using something like:
> 
> GetCategories()
> Category (Applications)
> Category (Applications/Tools)
> Category (Applications/Games)
> Category (Admin)
> Category (Admin/Applications)
> 
> This would reduce getting the group list to one method, rather than the
> number of catalogs.
> 
  Sounds sane, it will change it

Tim



More information about the PackageKit mailing list