Many thanks for all these advices.<br><br>I did some more tests today. As Havoc's advice, I changed the code:<br> mode = DBUS_VALIDATION_MODE_DATA_IS_UNTRUSTED;<br>to<br> mode = DBUS_VALIDATION_MODE_WE_TRUST_THIS_DATA_ABSOLUTELY;
<br>, then re-compile D-Bus V1.0.2 with:<br> ./configure --host=arm-linux<br> --with-xml=expat<br> --without-x<br> --disable-tests<br> --disable-verbose-mode<br>
--disable-asserts<br> --disable-checks<br> make install<br><br>And the test program is:<br> client<br> gettimeofday() /* -> timer1 */<br> dbus_message_new_method_call()
<br> dbus_message_append_args()<br> dbus_message_set_no_reply()<br> dbus_connection_send()<br> dbus_connection_flush()<br> gettimeofday() /* -> timer2 */<br> <br> gettimeofday() /* -> timer3 */
<br> dbus_message_new_method_call()<br> dbus_message_append_args()<br> dbus_connection_send_with_reply_and_block()<br> gettimeofday() /* -> timer4 */<br> <br> server<br> dbus_filter()
<br> {<br> gettimeofday() /* -> timer5 */<br> }<br><br>Results(data unit is "byte", time unit is "microsecond"):<br> input output timer1 timer2 timer3 timer4 timer5
<br>---------------------------------------------------------------------------------------<br> 0 0 0 2260 - - 1336<br> 0 0 - - 0 462 1987
<br> 100 0 0 2741 - - 1701<br> 100 0 - - 0 573 1991<br> 100 100 0 2826 - - 1547<br> 100 100 - - 0 462 3647
<br><br> I'am glad to see it works much better. Nevertheless, I want it can complete a synchronous remote call in several hundreds microseconds(at least < 1500 microseconds). And it is more slower(about 1.3x) if I use the bus-daemon.
<br><br> I have noticed that D-Bus is designed to enable asynchronous communication and avoid round trips, but I hope to use this useful message bus system in my embeded system. In this system, there are synchronous remote calls as many as asynchronous calls. That's why I care about the performance of D-Bus greadtly.
<br><br>