On Wednesday 23 September 2009 07:20 AM, Fernando Perez wrote:
>> https://svn.enthought.com/enthought/wiki/TVTKIntroduction#visual
>>
>> I've used vpython too, and I thought it was really nice and simple.
> 
> Prabhu may comment with more information, but in the meantime, it's
> worth keeping in mind that 'tvisual' has significantly lower
> performance than visual, and in this case I'm not sure it can be
> fixed.  The issue is that the traits event handling machinery proves
> to be too much overhead when you're trying to render a 3d scene at
> interactive framerates, and the geometry is already being computed by
> a python loop. Since tvtk is based on traits, all the traits machinery
> is still active and in this case may be a bit too much.

Thanks Fernando.  The speed issue is still true but I wouldn't blame 
traits since that isn't the source of the bottleneck. I think there are 
a little too many events and too many renders. I have not had the time 
to profile it carefully.

> If memory serves me right, Prabhu wasn't super optimistic about being
> able to match vpython performance with tvisual, but I could (and would
> love to) be misremembering, or perhaps it's just a matter of putting
> manpower into it and not a fundamental limitation.

I am not sure at all, since I haven't had the chance to look closely 
enough but it is possible that there are too many events flying around 
calling too much Python code.

> In case you'd like to run a simple comparison (and perhaps things have
> improved), I'm attaching a simple example of parabolic motion written
> both for vpython (old version) and tvtk/visual.  Caveat: I haven't run
> this code in years, so I'm not sure it runs with today's vpython or
> tvtk.

It does and visually there is no difference but there is an order of 
magnitude speed difference between the two in terms of CPU time.

prabhu

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to