[issue1327] Python 2.4+ spends too much time in PyEval_EvalFrame w/ xmlrpmclib

Amaury Forgeot d'Arc report at bugs.python.org
Tue Jan 22 16:06:20 CET 2008


Amaury Forgeot d'Arc added the comment:

Please, could you use the python profiler instead? Since most of the
time is spent in the bytecode interpreter, the results are much more
meaningful.
Something like:

#!/usr/bin/env python
import xmlrpclib
import profile

u = 'someuser'
p = 'password'
server_url = 'http://rhn.redhat.com/rpc/api'

def f():
    server = xmlrpclib.Server(server_url)
    session = server.auth.login(u,p)
    l = server.channel.listSoftwareChannels(session)
    for a in l:
        print a['channel_label']

def g():
    try:
        f()
    except:
        pass

profile.run("g()")

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1327>
__________________________________


More information about the Python-bugs-list mailing list