Re: [PATCH] Add a basic date format check to DIDL-Lite parser



On Sun, Jul 17, 2011 at 5:52 PM, Jens Georg <mail jensge org> wrote:
> On Do, 2011-07-14 at 01:49 +0300, Zeeshan Ali (Khattak) wrote:
>> Hi,
>>
>> On Mon, Jul 11, 2011 at 11:48 AM, Sven Neumann <s neumann raumfeld com> wrote:
>> > On Mon, 2011-07-11 at 09:58 +0200, Jens Georg wrote:
>> >> > Could we try to keep the DIDL-Lite parser as efficient as possible? It
>> >> > is already rather slow the way it is implemented right now. This is a
>> >> > real problem on embedded devices.
>> >>
>> >> Can you point out the other issues you're seeing? Maybe we can fix them
>> >> this cycle?
>> >
>> > I can't point at a particular issue. All I can say is that parsing
>> > DIDL-Lite takes a considerable amount of CPU cycles. It might help to
>> > use a SAX based parser instead of building the DOM, but that would be a
>> > major rewrite of gupnp-av and I am not sure if it's worth the effort.
>>
>>   Especially since we don't know for certain that DOM building takes
>> most of the CPU. For example, It could very well be the gobject
>> creation.
>>
> I did small test parsing ~3800 DIDL iitem snippets, the time
> distribution in there looks like:
>        10% g_object_unref
>        14% g_object_new
>        70% xmlRecoverMemory

  Awesome! Now we at least know which functions take the most CPU.

  However, I wonder if those percentages map to real scenarios. Any
decent client will never parse that many DIDLs in a short amount of
time. i-e it will only browse objects that are actually needed and
even then, it will use the right filter to get only the properties
that it needs. Usually that translates to what is visible to user at a
particular time and neighbouring objects. Right?

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124


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