[sigc] [performance] slot_base::empty



I've converted our system from using an old fashioned observer pattern
to using signals.  For the most part everything performs well, but there
is one feature that seems to take minutes instead of seconds now.

I compiled my app for profiling and ran it for 22 minutes repeatedly
exercising this feature.  At the top of my gprof output is
slot_base::empty taking 49.3% of my applications run time (being called
400 million times).

I optimized the app and repeated the above.  In this version at the top
of my gprof output is signal_impl::sweep taking 50.46% of my application
run time (being called 30 million times).

My question:  What kinds of improper use of sigc could be causing this
(so I might remove any such cases)?  On the other hand is there anything
I might be able to do in sigc to reduce the number of times sweep calls
empty?  or perhaps reduce the number of times sweep is called all together?

Any and all insights much appreciated.

Thanks,
Neal




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]