Re: dynamic containers issue


On Fri, May 14, 2010 at 9:49 AM, Juan A. Suarez Romero
<jasuarez igalia com> wrote:
> On Fri, 2010-05-14 at 03:20 +0300, Zeeshan Ali (Khattak) wrote:
>>   In that case I just misunderstood and my concerns are misplaced. The
>> only question that remains is then whether you want me to implement
>> the ChildCount (actually ContainerCount & ItemCount) in rygel or you
>> want to handle that in rygel-grilo? At first thought, it seems correct
>> to do so in rygel as this issue is (at least currently) specific to
>> UPnP but when you think about implementation details, you realize that
>> it will be inefficient to do it in rygel.
> Right now, I'm implementing them in rygel-grilo. So do not worry about
> it ;)


> The problem with implementing ContainerCount and ItemCount (as well as
> Items and Containers properties) is that I need to retrieve all children
> from backend. Why? First, because Grilo only provides "Children", it is
> not able to filter them by 'container' and 'item'.
> Also, while Grilo provides a key named ChildCount, still I can't use it:
> some backends are not able to handle this key, and even so, it refers to
> number of items+containers, so I still need to retrieve the elements to
> count them by hand.
> As obviously this can take a huge amount of time, depending on the
> backend, I added an option to rygel-grilo to limit the number of
> children when using those 4 keys.

  In case of Rygel, I am only concerned with ChildCount so what we
could do is to add a new mandatory property for that. ContainerCount
and ItemCount are already made optional.

  Regarding the performance problem you mentioned, I suggest you bite
the bullet and browse the whole container to count the number of
children since user will have no way of knowing that and once she
realized that we are only showing part of the complete listing, she
will get really annoyed. In order to hide this issue from apps/user,
what you could do is to report 0 children in such containers when a
client asks for this property, start browsing asynchronously the
container(s) and emit an updated signal for the container once you
know the number of children.

  BTW, call for lightning talks for GUADEC just opened. I think
rygel-grilo will nicely fit in there. :)


Zeeshan Ali (Khattak)
FSF member#5124

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]