Search code examples
dbus

D-Bus: Performance improvement practices


What are some good practices to obtain better time performance in applications that heavily utilize D-Bus?

Here are a few that our team has learned through the school of hard knocks:

  • Try to combine data entities together into a single, large structure/object to send over D-Bus IPC.
  • Try to have all D-Bus traffic come into a single proxy at a single point in your application/process, rather than having them spread throughout your application/process.

Solution

  • There have been a couple of good talks on this subject by the developer of Bustle which is a tool to help you visualise and measure the D-Bus performance of your application and the services its talking too.

    There is also some D-Bus API design documentation which discusses how to design performant D-Bus APIs. The most important principle is to reduce the number of round-trips your API requires clients to make.