Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Optimisation of GLES update times
-
Strangely, however, using setObject_ForKeyedSubscript seems to be MUCH slower than just passing a json object. Perhaps this is because the python to objc bridge has some overhead in creating a random object (using this with a json'd string is much faster). Also, I am not entirely sure how you would turn a generic object back into the python equivalent. Perhaps other data structures are faster, such as a generic ctypes Structure.
-
@JonB using a JSON string is so much faster thankyou for the suggestion. I will update the repo soon after I clean a little bit of the code up....
-
@JonB and @Cethric - this seems to imply that the JS runtime system is highly optimized for JSON encoding and decoding. That would not be a big surprise. The new method for transferring the data seems to also confirm that moving all the data in a single blob and with a single call back into python is the best strategy. I was thinking that the send_to_python call could also be running faster if the JSON method is handled via a http POST like mechanism rather then a http PUT. It certainly is interesting.