Message Validation
Jon Gosting
yukarionsen at gmail.com
Tue Oct 7 10:14:22 PDT 2008
Hi,
I am interested in using dbus in an embedded system. Some of the processes
in the system will send signals that have large byte arrays in the payload.
While running some benchmarks, I noticed that sending a message that
contains an array of bytes takes approximately 3 - 4 times as long as
sending a message with the same payload declared as an array of integers
with 1/4 the number of elements (i.e. the number of bytes transferred is the
same, only the type declaration differs). Upon investigating I noticed that
some of the extra overhead is caused by message validation. I read about
running libdbus in "trusted peer" by setting mode to
DBUS_VALIDATION_MODE_WE_TRUST_THIS_DATA_ABSOLUTELY (load_message,
dbus-message.c), on this mailing list.
I have a small, known set of dbus clients with a known set of messages, so
it seems that this is a good solution for me. However, I have two questions
about this:
1. I noticed that some of the execution time in the scenario described
above is in the dbus-daemon. I suspect that it is also caused by message
validation, but didn't see where this was happening in the code. Is there a
similar change that I can make in the dbus-daemon code to put it into
"trusted peer" mode?
2. Are there any plans to make this a configuration option (either
compile-time or run-time) in the future?
Thanks,
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20081007/37bf0eba/attachment.html
More information about the dbus
mailing list