On Jul 8, 6:02 pm, altern <[EMAIL PROTECTED]> wrote:
> i noticed that CPU usage goes up when the mouse is moved, no matter if
> on_mouse_motion is declared or not. In a simple example i am working on
> it goes up from 5% to 15%.

That isn't surprising, given that there is an event to handle. Even if
Pyglet doesn't do anything with it, the application still receives
events.

>The frame rate goes up as well from 35 to 75 fps.

That, however, is a bit surprising. Either it's some sort of bug, or a
scheduling artifact where rendering happens to be quicker because of
fewer context switches, perhaps. Bear in mind that it may not be as
big a difference as it appears - see if you can turn v-sync off, and
try again.

> I also noticed that the problem with the CPU boosting when mouse is
> moved stops if i use
> pyglet.clock.schedule(update)
> instead of
> pyglet.clock.schedule_interval(update, 1/15.)
> again the CPU goes up to 13% with the fist while the second achieves ~7%

But it's not really a 'problem'. If more is going on, you must expect
CPU usage to rise, unless the system is already polling inefficiently,
in which case you will have the inefficient speed all the time instead
of just when it's needed.

--
Ben Sizer

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