[vlc-devel] [PATCH] dbus: Prevent dictionary from growing out of control
mirsal at mirsal.fr
Wed Feb 22 14:38:06 CET 2012
On Wed, 2012-02-22 at 13:11 +0200, Casian Andrei wrote:
> 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.
OK, This fix should also be included in the next bugfix release then.
Can someone ACK the first patch ?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: This is a digitally signed message part
More information about the vlc-devel