GMainContext: reorganize source list to avoid O(n) behavior
authorDan Winship <danw@gnome.org>
Wed, 11 Apr 2012 17:08:13 +0000 (13:08 -0400)
committerDan Winship <danw@gnome.org>
Tue, 26 Jun 2012 12:40:32 +0000 (08:40 -0400)
commit55bac5da0ada8f46824a4d565cdd8ea7e3774a47
treed0fcf40131ce7e7a694afd6f5ebce2f15293188f
parentaaaaab91de10445a178e8183a95d98189249e868
GMainContext: reorganize source list to avoid O(n) behavior

Rather than having a single priority-ordered list of GSources, store a
list of queues of each priority level. This means that adding a source
is now O(n) in the number of unique priority levels currently being
used, rather than O(n) in the total number of sources.

https://bugzilla.gnome.org/show_bug.cgi?id=619329
glib/gmain.c