On 13 juin, 02:58, Joe Wreschnig <[email protected]> wrote:
> On Sat, Jun 12, 2010 at 5:56 PM, Joe Wreschnig <[email protected]> 
> wrote:
> > On Sat, Jun 12, 2010 at 10:02 AM, caribou <[email protected]> wrote:
> >> Hello,
>
> >> I'm having some issues with the dispatcher. That happened on my
> >> application while i was trying to dispatch something like 15 events
> >> every 1/20s, my fps went from 40 fps to 10fps with freezes.
>
> >> I tried to reproduce the problem on a small piece of code (see below)
> >> and dispatching 200 events per 1/20s makes my fps goes from 90fps to
> >> 10fps.
>
> > In the code you posted, you're dispatching 200 events to 200 objects
> > per 1/30 seconds, or 1,200,000 dispatches per frame. That's just too
> > many.
>
> Er, 1,200,000 dispatches per second, or 40,000 per frame. Which is
> still too many. (By comparison, a no-op call takes about 0.5usec,
> meaning 60% of that second is spent just calling and returning, not
> doing any real work.)

Well, that's a lot to dispatch indeed ! Ok so this example is useless,
sorry, but what about 6750 dispatches per second (which what's
occuring in my game when you dispatch 15 events to 15 objects). When
dispatching by browsing a dictionary containing my objects that's a
lot better, what makes the pyglet dispatcher slower ?

-- 
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