[vlc-devel] [PATCH] dbus: Prevent dictionary from growing out of control

Casian Andrei skeletk13 at gmail.com
Wed Feb 22 12:11:38 CET 2012


Hello,

2012/2/22 mirsal <mirsal at mirsal.fr>

> Hi, and thank you for your patches !
>
> On Wed, 2012-02-22 at 10:33 +0200, Casian Andrei wrote:
> > For each item that was appended or deleted, the ("Tracks", NULL) pair
> > was inserted (duplicated over and over) in the tracklist_properties
> > dictionary.
>
> Actually, this is very unlikely to happen as the dbus main loop is woken
> up as soon as an event occurs, which means that events are processed one
> at a time in most cases.
>
> > The dictionary was inserting it in the same position and
> > it assumed it had hash collisions, triggering an expansion at every
> > insertion of that pair.
>
> Yes, though it happens only if the same event is triggered more than
> three times during the same main loop iteration. (which should almost
> never be the case in practice)
>

I was expecting that this would not happen too often, but, in my case, each
time I added or deleted large number of files in the media library, the
system's memory was consumed in about 2 seconds because of this (when dbus
main loop woke up it had a large number of events to handle). VLC and the
whole system quickly became unusable.

Best regards,
Casian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120222/4d00c381/attachment.html>


More information about the vlc-devel mailing list