Hi TurboGears users,
I know this issue has been discussed a couple of times here. I did
however just today read a blog post which made me post about it
(http://gmarceau.qc.ca/blog/2009/05/speed-size-and-dependability-
of.html). It seems like psyco can be expected to give relatively large
performance improvements over vanilla Python in applications where CPU
cycles are a limiting factor (which they are in mine).
I therefore tried using psyco with TG1. Unfortunately I have not been
successful in either compiling the entire project or just the CPU
hungry parts of it with psyco. When I try to just compile a helper
function I get the following error:
Page handler: <bound method Root.index of
<ncwebpro.controllers.root.Root object at 0xc912fcc>>
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/
cherrypy/_cphttptools.py", line 121, in _run
self.main()
File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/
cherrypy/_cphttptools.py", line 264, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in index
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.9dev_r6298-
py2.5.egg/turbogears/controllers.py", line 352, in expose
_build_rules(func)
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.9dev_r6298-
py2.5.egg/turbogears/controllers.py", line 248, in _build_rules
_expose.when('allow_json and (kw.get("tg_format", None) == "json"'
AttributeError: 'function' object has no attribute 'when'
and if I try to simply compile the entire application (in start-
app.py) I get:
Page handler: <bound method Root.index of
<ncwebpro.controllers.root.Root object at 0xf96e2cc>>
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/
cherrypy/_cphttptools.py", line 121, in _run
self.main()
File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/
cherrypy/_cphttptools.py", line 268, in main
raise
File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/
cherrypy/_cphttptools.py", line 264, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in index
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.9dev_r6298-
py2.5.egg/turbogears/controllers.py", line 352, in expose
_build_rules(func)
File "/usr/lib/python2.5/site-packages/TurboGears-1.0.9dev_r6298-
py2.5.egg/turbogears/controllers.py", line 240, in _build_rules
[generic(CustomDispatch)]
File "build/bdist.linux-i686/egg/dispatch/__init__.py", line 95, in
generic
File "/usr/lib/python2.5/site-packages/DecoratorTools-1.7-py2.5.egg/
peak/util/decorators.py", line 553, in decorate_assignment
oldtrace = [frame.f_trace]
File "/usr/lib/python2.5/site-packages/psyco/support.py", line 128,
in __getattr__
"no '%s' attribute" % attr)
AttributeError: emulated Psyco frames have no 'f_trace' attribute
Has anyone been able to use psyco with TurboGears? I suspect that the
last error is related to one of the known limitations of psyco:
http://psyco.sourceforge.net/psycoguide/bugs.html
Any help is appreciated.
Best regards,
Jesper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---