The global message cache in dbus-message.c avoids caching message objects where the total length (header + body) is larger than MAX_MESSAGE_SIZE_TO_CACHE. However, this doesn't account for possible over-allocations in DBusString: we should probably base the decision on DBusRealString::allocated rather than DBusRealString::length?
(Please disregard the original title of this bug, which was misleading.)
Created attachment 44205 [details] [review] DBusString: add _dbus_string_get_allocated
Created attachment 44206 [details] [review] DBusMessage: only cache messages that don't have too many bytes allocated
Looks good. (But is the difference really that big that this matters?)
(In reply to comment #4) > (But is the difference really that big that this matters?) Since messages are effectively add-only, I doubt it.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.