On Apr 18, 2:08 pm, "Drew Smathers" <[EMAIL PROTECTED]> wrote:
> 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.
>

I'll give hotshot a go and see if I can get any more success with that
- it does look nicer, and it looks like I may be able to get it to do
what I want it to do by applying it differently. Also, whereas
premature optimization may be the root of all evil, it's important to
remember that optimization isn't - I'm at the stage where everything
works, just a bit slower than I'd like it to!

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

Should have really searched. Thanks for that.
--~--~---------~--~----~------------~-------~--~----~
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