xodio / xod

XOD IDE
https://xod.io
GNU Affero General Public License v3.0
889 stars 119 forks source link

Introduce setImmediate API #2056

Closed evgenykochetkov closed 3 years ago

evgenykochetkov commented 3 years ago

Before, we used setTimeout(0, ctx) to schedule evaluation of a node as soon as possible. But it would only mark node as dirty on the next millisecond and generate some unnecessary code.

setImmediate is a new API for this particular case that works faster, generates less code and occupies less RAM.