Espruino uses a statically allocated block of memory for all its variables. There's no point having 2000 variables if you can't actually use them because the memory has been allocated for something else!
All you can do is reduce the amount of JsVars that are used so you don't use up all your memory.
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.
Espruino uses a statically allocated block of memory for all its variables. There's no point having 2000 variables if you can't actually use them because the memory has been allocated for something else!
All you can do is reduce the amount of JsVars that are used so you don't use up all your memory.