On Thu, Apr 17, 2008 at 7:28 PM, Tigga <[EMAIL PROTECTED]> wrote:
>
>  Hi all. Finally managed to convince google to let me join the group...
>
>  Whats more, I have a question! I've been struggling to get the python
>  profiler to work using the 1.1 event loop style. It gives me a nice
>  little warning:
>
>  C:\Python25\lib\profile.py:310: RuntimeWarning: tp_compare didn't
>  return -1 or -2 for exception
>
>  which I don't really know what means, and then fails to profile
>  anything called by my update or draw methods, seeming to only show
>  initialisation code. Obviously this is not ideal, as the update and
>  draw code is the stuff I need to profile...
>
>  At the moment I'm doing:
>
>  import profile
>  profile.run('main()')

Not sure there ... that should work.  I generally use the hotshot
module for profiling (and only in dire circumstances - remember that
premature optimization is the root of all evil).  It's little more
verbose, but will give you better control over stats reported, etc.
It does use profile, so the issue may be the same.

http://docs.python.org/lib/hotshot-example.html


>  Is this correct? Is it a pyglet problem, or a me problem. Could it be
>  both?

Without seeing your code, this amounts to a guessing game.

>  Also, and slightly unrelated, there appears to be an issue with psyco
>  and pyglet. It seems that for some reason psyco.full() doesn't allow
>  any events to reach the window (threading issue?). psyco.background()
>  works, but full should be faster. I like faster. Any thoughts on this?
>  Might just be pysco's fault.

You can turn off gl debugging, which will give you some better performance:

from pyglet import options
options['debug_gl'] = False

There has been some past discussion on this list concerning psyco+pyglet:
http://groups.google.com/group/pyglet-users/search?group=pyglet-users&q=psyco&qt_g=Search+this+group


-- 
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/ \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\ /\\\ \\
/ /\\\ /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
 d.p.s

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" 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/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to