I'm extending our inhouse agent platform to espruino and it seems that using apply() or call() is causing a very big slowdown. In my testcase it is between 0.5 seconds without and 15 seconds with call or apply. I'm not sure why this should be such a difference.. Can anyone shed some light on this?
I tried putting it in a small example to show the problem but I think its due to the size of the objects that it's slowing down. I couldn't succesfully reproduce it in a tiny example.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi all,
I'm extending our inhouse agent platform to espruino and it seems that using apply() or call() is causing a very big slowdown. In my testcase it is between 0.5 seconds without and 15 seconds with call or apply. I'm not sure why this should be such a difference.. Can anyone shed some light on this?
My code is on here:
https://github.com/AlexDM0/espruinoEVE
The example file is espruinoCall.js
You can alter line 150 to see the difference.
to
I tried putting it in a small example to show the problem but I think its due to the size of the objects that it's slowing down. I couldn't succesfully reproduce it in a tiny example.