Multithreaded Performance/Embedding

Laurent POINTAL pointal at lure.u-psud.fr
Fri May 5 04:12:41 EDT 2000


On Thu, 04 May 2000 10:57:37 -0700, "Warren L. DeLano"
<warren at sunesis-pharma.com> wrote:

>: Thanks for responding!
>: 
>: Yes: straightforward calls into C from Python are running much slower (OpenGL
>: rendering in particular) in the imported vs. embedded case.  However, this code
>: does make some calls to the Python API.

When your code make calls to the Python, it must re-avquire the global
Python lock... and maybe your time loss is here (other Python threads
runs, and may use the lock during long time).

Try to get all the datas needed by your thread at the beginning (ie.
in only one lock), and not call-back to Python during processing.

A+

Laurent.

---
Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email  : pointal at lure.u-psud.fr  ou  lpointal at planete.net 



More information about the Python-list mailing list