← Back to team overview

yade-dev team mailing list archive

Re: Interesting python usage

 

> The simulation is extremely slow.  Is it because I am using a lot of O.bodies.state by assessing the getScene() pointer? Or is it because python module is compiled everytime i call it?  
getScene is rather fast, it is just function returning pointer.
Importing the module will make it slow for sure. Why don't you import it
just once? The interpreter will remember it. I am not sure how to do
that with Python C API. I'd perhaps just run
PyRun_SimpleString("solverB.functionName(...)") passing args as string.

(I thought you were using the c module now instead of python...?)

v




Follow ups

References