I think you are running out of heap - E:M 656 I seem to recall is a failed memory allocation.
I ran your code on the ESP32. I clicked the button on the browser as quick as could - no fails... and it responded within 124-197 ms for the request.
@Wilberforce started
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.
I think you are running out of heap - E:M 656 I seem to recall is a failed memory allocation.
I ran your code on the ESP32. I clicked the button on the browser as quick as could - no fails... and it responded within 124-197 ms for the request.