Panda3D w/python vs. Java3D: performance in real time

Panda3D seems straightforward and relatively easy to use, but running even a simple script on my computer incurs more load than I would expect. Is Panda3D suitable for real-time experiments, in which responsiveness and timing tends to be important? We presently use Java3D.

jeah. panda is definetly suited for realtime stuff. thats the whole point of it existance.
if its slow. you’r most likely doing something wrong or you try to break hardware limits.
a great way to find out what’s wrong with your application is to use “pstats”
it can show you which part of your application takes how long to compute/render/process.
you can track down bottlenecks within minutes.

just have a look at pstats output, maybe post the images showing the graphs here so we can check whats wrong.

Thank you very much. That is very helpful.

Actually, nothing in the graphs strikes me as surprising. The script spends most of the time waiting, I believe.

I think the problem might be my method of judging load. I might have had unreasonable expectations for a bare script that continuously updates frames within a loop. I apologize for my hastiness in posting. I am new to this, so I will continue to learn about pstats, and to compare this script with our existing software. It is starting to look like Panda3D will be rather useful.

I really appreciate your help. Thanks again.

what excatly did you try to do? updating frames should be job of panda’s main loop. there should be no need to add your own one.

If you’re seeing a lot of time in “wait” while your script is doing very little, you’re probably seeing video sync. By default, Panda has video sync turned on, which means it won’t run any faster than your video refresh rate, usually 60 or 72 fps. There are good reasons to have this on, but if you just want to see big numbers, you can turn it off by putting “sync-video 0” in your Config.prc file.


Thomas: The script I made is exceptionally basic. I was referring to the Panda3D run loop. Since I do not know what goes on in there, I just assumed it is updating frames at a continuous rate. I meant only to compare it to a different sort of program that spends a good portion of processor time sitting idly, waiting for events.

David: If I am not mistaken, you are correct. That did seem to change the numbers substantially. I will leave sync on.

Thank you both. I am quite new to this and I need to quickly decide whether, or not, to use Panda3D, so I greatly appreciate your rapid input. I now believe that I was unnecessarily concerned (especially after comparing it to the existing software on this computer).

well the nice thing about panda is. you dont have to care about those things :slight_smile: panda’s main loop just runs and does the right thing.
of course, if you really need to, you can set up your own one, or change the existing. but in most cases that’s not necessary. yet another thing i like about panda :stuck_out_tongue:

greetings and an joyful panda experience,