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

NODE_CODE_CACHING updates #11077

Merged
merged 1 commit into from
May 4, 2020
Merged

NODE_CODE_CACHING updates #11077

merged 1 commit into from
May 4, 2020

Conversation

kripken
Copy link
Member

@kripken kripken commented May 4, 2020

@@ -1069,6 +1069,7 @@ function createWasm() {
// to load ok, but we do actually recompile the binary every time).
var cachedCodeFile = '{{{ WASM_BINARY_FILE }}}.' + v8.cachedDataVersionTag() + '.cached';
cachedCodeFile = locateFile(cachedCodeFile);
if (!nodeFS) nodeFS = require('fs');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would not normally get initialized? Maybe a comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is just a normal code pattern we have in a bunch of places. Not sure it's worth commenting everywhere.

We don't want to require('fs') during startup all the time, so we do it on demand. Maybe we should have a helper function getNodeFS or such?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(landing this, but if we have ideas to improve that pattern lets keep discussing and follow up with that)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm.. I just wasn't' familiar with this.

@kripken kripken merged commit 0c52621 into master May 4, 2020
@kripken kripken deleted the seria branch May 4, 2020 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants