Follow your suggestion, I write the "C" native Mask library for websocket module on Espruino.
On Esp32 module, I test the library for some times.
Without Mask-lib, It takes about 64 seconds to transfer 23KB data to a websocket server.
By using Mask-lib, It takes about 1.68 second to do the same work.
Mask-lib can improve the performance of 'ws' about 40 times.
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, @Gordon
You are right!
Follow your suggestion, I write the "C" native Mask library for websocket module on Espruino.
On Esp32 module, I test the library for some times.
Without Mask-lib, It takes about 64 seconds to transfer 23KB data to a websocket server.
By using Mask-lib, It takes about 1.68 second to do the same work.
Mask-lib can improve the performance of 'ws' about 40 times.
All codes are here:
jswrap_mask.h
jswrap_mask.c
Change in ws.js
Espruino is flexible, Cool!