-
Notifications
You must be signed in to change notification settings - Fork 30k
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
module: skip NODE_COMPILE_CACHE when policy is enabled #52577
Conversation
It might be worth designing a policy for the compilation cache. For now, just skip the cache when policy is enabled.
huh there isn't a team for policy, it seems, so cc @nodejs/startup @nodejs/loaders @nodejs/security |
@@ -1096,6 +1096,12 @@ void Environment::InitializeCompileCache() { | |||
dir_from_env.empty()) { | |||
return; | |||
} | |||
if (!options()->experimental_policy.empty()) { | |||
Debug(this, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a warning instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The environment variable is designed to be as silent as possible. I don't think there's anything to warn - you don't get a speed up and that is all, your code will still work as intended. If you are using policy it's likely that you are already aware this is already leading to a slowdown for every module loaded due to all the checks required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for following up with this!
Updated the test to skip in no crypto builds because policy requires crypto to work. |
Landed in 2231be6 |
It might be worth designing a policy for the compilation cache. For now, just skip the cache when policy is enabled. PR-URL: #52577 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
It might be worth designing a policy for the compilation cache. For now, just skip the cache when policy is enabled. PR-URL: nodejs#52577 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
It might be worth designing a policy for the compilation cache. For now, just skip the cache when policy is enabled.