jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

Performance issue #153

Closed CaravaggiosFillide closed 8 years ago

CaravaggiosFillide commented 8 years ago

I have just rewritten one of my main projects in processing to python and it has been a true pleasure. The problem is now that I have both finished the performance I get out of the python version is only a fraction of the java version. (fps java: 60, fps python: 8) even with GPU acceleration on the java binary. Is there any way to fix this or is using the python mode inherently this much slower?

jdf commented 8 years ago

Python mode, which interprets python in java, is inherently slower than java processing, especially when performing loops. The gpu is not used for executing your program, nor are multiple processors.

jdf commented 8 years ago

Also, some time ago I created a tutorial about "going native" for performance.

https://github.com/jdf/processing.py/wiki/How-to-call-%22native%22-Java-code-from-your-Python-Mode-sketch