From: Jonathan B. <jbr...@ea...> - 2004-01-13 13:14:43
|
On Tue, 2004-01-13 at 00:54, James Roper wrote: > Hi, > > I'm using vpython in computational simulation. A little concerned about > the efficiency, I ran the following tests: > [snipped tests showing visual running in the backgronud] > This in my view is pretty poor efficiency, considering that visual > python is doing nothing but displaying a static ball on the second call > to dostuff(). Is there anyway to tell visual python to lay off and do > nothing for a while? So... in the context of my work, when I call the > functions that do all the hard work, i would tell visual python to do > nothing, and then when the functions return, i'd tell visual python to > start doing stuff again. BTW, what is it doing that slows everything > down so much? Visual performs all of its rendering in the background in a separate thread. This thread runs fast enough to render not more than 30 frames per second in each display. This is a feature and not a bug and is the reason that you can do anything with the window or the objects drawn within it without having to explicitly call some kind of update function every time. That said, I have been thinking of some kind of rendering synchronization method that would allow you to do what you are talking about. Would you like to submit a feature request in the Sourceforge tracker? -Jonathan Brandmeyer P.S. I apologize for accidentally sending this as a private message to Mr. Roper a few min ago. |