fastboot
fastboot copied to clipboard
use v8 cache data for vm script
the var fileScript = new vm.Script(source, { filename: filePath });
does not need be redone every time, it doesn't hold context state. The thing we are caching this.sandbox actually does hold state.
@krisselden are you suggesting do it once when the Node server comes up only? We currently do it once on startup and everytime some calls reload
.
It would make reload() cheaper, but for some reason I had it in my head we were doing a new one for different sessions.
Aah no we don't do it for different sessions but when the Node process starts up and reload. I'll put a PR that splits this so reload is cheaper.