[Twisted-Python] Fwd: Example code for problem with twisted+pyglet
Nathan
nathan.stocks at gmail.com
Wed Apr 2 10:26:54 MDT 2008
Oh, and despite the date on the original message, this is NOT an April
Fool's day joke. Just thought I should clarify that!
I should also mention that a separate (personal) project of mine that
uses twisted/AMP+pyglet but NOT SSL does not display any performance
degradation. Weird.
~ Nathan
---------- Forwarded message ----------
From: Nathan <nathan.stocks at gmail.com>
Date: Tue, Apr 1, 2008 at 5:19 PM
Subject: Example code for problem with twisted+pyglet
To: Twisted general discussion <twisted-python at twistedmatrix.com>,
pyglet-users at googlegroups.com
(I'm cross-posting this to the twisted and pyglet mailing lists, as
I've been actively discussing this with people on both lists)
----------------------------------
Problem: When I add AMP with SSL with SSL-client certificates to
Pyglet 1.1 (svn trunk, actually) on OS X 10.5.2, pyglet goes from
drawing at a smooth 60fps (which is the limit I set) to an extremely
choppy low fps. The problem started when I upgraded from Pyglet from
1.0 to 1.1.
Hardware:
MacBook Pro, Intel Core 2 Duo, 2.2Ghz, 2GB RAM, GeForce 8600M GT w/128MB VRAM
Software:
OS X 10.5.2 with Graphics Update
Apple-installed python 2.5.
Twisted 8.0.1 (installed package from
http://tmrc.mit.edu/mirror/twisted/Twisted/8.0/Twisted-8.0.1_py2.5_osx10.5.pkg
-- export PYTHONPATH=/Library/Python/2.5/site-packages )
pyglet trunk (revision 1990, http://pyglet.googlecode.com/svn/trunk -
installed with 'sudo python setup.py install' )
To duplicate:
1) Download http://stocksfam.com/example.tar.bz2 and untar it with
"tar jxvf example.tar.bz2" which creates an example directory.
2) Open two terminals and change to the example directory.
3) Run "./server.py" in one terminal. This sets up an AMP+SSL server.
4) Run "./client.py" in the other terminal. The Pyglet+AMP+SSL client
will launch, and a Pyglet 1200x800 window will pop up with a gray log
window.
5) Click and drag the gray log window around. Notice how extremely
choppy it is. I don't know how to debug it! Under Pyglet 1.0, there
was no choppiness -- it stayed a smooth 60.0fps.
What can be done to debug this? If I knew where to start, I'd try to
find the problem myself, but I'm not very familiar with the internals
of twisted or pyglet, and I'm also not very familiar with debugging
python code beyond using print statements and common sense...
~ Nathan
More information about the Twisted-Python
mailing list