[Twisted-Python] Twisted and python-ogre

Bernie Roehl broehl at gmail.com
Fri Feb 15 11:09:07 EST 2008

On Fri, Feb 15, 2008 at 10:51 AM, Jean-Paul Calderone <exarkun at divmod.com>

> On Fri, 15 Feb 2008 10:31:14 -0500, Bernie Roehl <broehl at gmail.com> wrote:
> >As an experiment, I tried switching to using a coiterator.  I got a 30%
> >increase in framerate!
> Hmmm. :)

Hmmm indeed!

> There shouldn't really be any performance difference between using
> coiterate and using LoopingCall.  The significant behavioral difference
> is that coiterate will call your code (RendererIterator.next in this
> case) as fast as it can (with some constraints).  LoopingCall will call
> your code no faster than you specify.
> So my guess is that the 30% increase in FPS is because your system is
> capable of doing that much additional work above what you asked to do
> when you used LoopingCall.  If you make a corresponding decrease in the
> interval you use with LoopingCall, do you not see any increase in FPS?

Well, I was using

            renderTask = task.LoopingCall(renderFrame)
            renderTask.start(0.01, False)

If I change the 0.01 to 0.0, I do indeed get a framerate comparable to using
the coiterator methord.

I wouldn't have thought that waiting ten milliseconds between calls would
make such a substantial difference.

Bernie Roehl
Mail: broehl at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080215/ef5cc52f/attachment.htm 

More information about the Twisted-Python mailing list