From a58180de0e720f7fca46a5af69a7b27b5e102a1d Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 26 Nov 2004 06:22:53 +0000 Subject: 2004-11-26 Havoc Pennington * dbus/dbus-message.c (struct DBusMessage): put the locked bit and the "char byte_order" next to each other to save 4 bytes (dbus_message_new_empty_header): reduce preallocation, since the message cache should achieve a similar effect (dbus_message_cache_or_finalize, dbus_message_get_cached): add a message cache that keeps a few DBusMessage around in a pool, another 8% speedup or so. * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function --- dbus/dbus-internals.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-internals.h') diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 258c6462..7e3c458f 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -265,7 +265,8 @@ _DBUS_DECLARE_GLOBAL_LOCK (atomic); _DBUS_DECLARE_GLOBAL_LOCK (bus); _DBUS_DECLARE_GLOBAL_LOCK (shutdown_funcs); _DBUS_DECLARE_GLOBAL_LOCK (system_users); -#define _DBUS_N_GLOBAL_LOCKS (9) +_DBUS_DECLARE_GLOBAL_LOCK (message_cache); +#define _DBUS_N_GLOBAL_LOCKS (10) dbus_bool_t _dbus_threads_init_debug (void); -- cgit