Ticket #2972 (closed enhancement: fixed)

Opened 22 months ago

Last modified 14 months ago

excess work on quit

Reported by: mariano Owned by: asterix
Priority: low Milestone: 0.12
Component: xmpppy Version: svn
Severity: normal Keywords:
Cc: OS: All

Description

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.

Attachments

Change History

Changed 22 months ago by mariano

Well. Now I just commenting out doesn't wors AS fine. I'll have to find less lame solution. :-)

Changed 14 months ago by asterix

  • status changed from new to closed
  • resolution set to fixed
  • os set to All
  • milestone set to 0.12

it's now ok with [8913]

Add/Change #2972 (excess work on quit)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.