Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use v8 cache data for vm script #166

Open
krisselden opened this issue Sep 20, 2017 · 4 comments
Open

use v8 cache data for vm script #166

krisselden opened this issue Sep 20, 2017 · 4 comments

Comments

@krisselden
Copy link
Contributor

No description provided.

@krisselden
Copy link
Contributor Author

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.

@kratiahuja
Copy link
Contributor

@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.

@krisselden
Copy link
Contributor Author

It would make reload() cheaper, but for some reason I had it in my head we were doing a new one for different sessions.

@kratiahuja
Copy link
Contributor

kratiahuja commented Sep 22, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants