[Twisted-Python] Slow PB imports

Marcel Gädigk spam at herox.net
Wed Nov 2 05:34:27 EDT 2011


Hi,

i using the Perspective Broker and i have problems with the speed of 
importing the modules.
It takes 15 - 17 seconds for importing the Reactor and the 
PBServerFactory (or other pb imports).
If i import the reactor or the pb imports alone it takes in avg. 2-3 
seconds.

def ImportIt():
     from twisted.internet import reactor
     from twisted.spread.pb import PBServerFactory

import timeit
t = timeit.Timer(setup='from __main__ import ImportIt', stmt='ImportIt()')
print t.timeit()

How can i improve this?

I running win7 32bit SP1 on a 2,93 Ghz Core 2 Duo with python 2.7.1 and 
twisted 11.0

cheers

Marcel




More information about the Twisted-Python mailing list