diff options
author | Ted Gould <ted@gould.cx> | 2010-09-27 20:15:46 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-09-27 20:15:46 -0500 |
commit | 761c9cc00f19001548d23fe09a3e1676e728ad73 (patch) | |
tree | 966338d70d398efc5623949b889e2ef43cb7f695 | |
parent | 7fa04256d9aac8e1ea2a2982a7b93276fb981fa4 (diff) | |
download | libdbusmenu-761c9cc00f19001548d23fe09a3e1676e728ad73.tar.gz libdbusmenu-761c9cc00f19001548d23fe09a3e1676e728ad73.tar.bz2 libdbusmenu-761c9cc00f19001548d23fe09a3e1676e728ad73.zip |
Set a maximum number of entries to queue before sending the message.
-rw-r--r-- | libdbusmenu-glib/client.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 91dc356..52cb24f 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -43,6 +43,10 @@ License version 3 and version 2.1 along with this program. If not, see #include "server-marshal.h" #include "client-marshal.h" +/* How many property requests should we queue before + sending the message on dbus */ +#define MAX_PROPERTIES_TO_QUEUE 100 + /* Properties */ enum { PROP_0, @@ -628,6 +632,13 @@ get_properties_globber (DbusmenuClient * client, gint id, const gchar ** propert priv->delayed_idle = g_idle_add(get_properties_idle, client); } + /* Look at how many proprites we have queued up and + make it so that we don't leave too many in one + request. */ + if (priv->delayed_property_listeners->len == MAX_PROPERTIES_TO_QUEUE) { + get_properties_flush(client); + } + return; } |