GDBus Optimizations
Submitted by Mike Gorse
Assigned to David Zeuthen
Link to original bug (#634471)
Description
I was considering using gdbus for new code I write in AT-SPI, so I wrote a couple of simple tests to compare its performance to that of libdbus. I created a program that would call GetConnectionUnixProcessID 20000 times using libdbus and an equivalent program using gdbus. I timed the programs on my Thinkpad T61 laptop (2.4ghz Pentium Core 2 Duo 7700 cpu) and got the following results:
Real: 9.132 s for gdbus; 2.321 s for libdbus User: 6.536 s for gdbus; 0.744 s for libdbus System: 0.8 s for gdbus; 0.208 s for libdbus
Gprof gives me the following, although I don't know how useful it wil be:
% cumulative self self total
time seconds seconds calls ms/call ms/call name
16.23 1.19 1.19 g_variant_type_string_scan
9.75 1.91 0.72 g_atomic_pointer_get
4.43 2.23 0.33 g_atomic_int_get
3.41 2.48 0.25 pthread_mutex_lock
2.59 2.67 0.19 g_variant_type_get_string_length
2.59 2.86 0.19 g_type_check_instance_is_a
2.46 3.04 0.18 g_variant_type_check
2.32 3.21 0.17 __pthread_mutex_unlock_usercnt
2.32 3.38 0.17 g_type_check_instance_cast
1.84 3.52 0.14 g_atomic_int_compare_and_exchange
1.77 3.65 0.13 g_variant_type_info_assert_no_infos
1.64 3.77 0.12 _int_malloc
1.50 3.88 0.11 g_variant_type_equal
1.50 3.99 0.11 memcpy
1.23 4.08 0.09 malloc
1.09 4.16 0.08 cfree
1.09 4.24 0.08 g_variant_type_peek_string
1.02 4.31 0.08 g_atomic_int_exchange_and_add
Version: 2.33.x