excess work on quit
I think gajim does some things twice (or more) on shutdown. Here's an excerpt from profiler:
% callees transports_nb.py.*disconnect
2 0.000 3.959 client_nb.py:73(disconnected)
2 0.000 3.923 connection.py:771(_on_disconnected)
% callees client_nb.py.*disconnected
2 0.000 3.957 connection.py:141(_disconnectedReconnCB)
So there are two most CPU consuming functions called on exit: connection.py:_on_disconnected() and connection.py:_disconnectedReconnCB(). _on_disconnected() is a small function:
def _on_disconnected(self):
self.dispatch('STATUS', 'offline')
self.disconnect()
It seems _disconnectedReconnCB() does the same actions though. I think it's possible to safely dump _on_disconnected() and save few seconds on my Pentium M 1.4Gh. I commented out the function's body and everything works fine for me.