-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(ext/node): have process
global available in Node context
#27562
fix(ext/node): have process
global available in Node context
#27562
Conversation
…global-based-on-55d345b
IIRC this will might have a negative perf impact on usage of the |
Thanks for pointing that out Nathan. When I discussed this with Bartek, he also mentioned that potentially bad impact, but we decided to go this way assuming that the impact is little. That said, it makes a lot of sense to do a benchmark to make sure. |
I made a very simple benchmark where it adds up the values 10k times returned from https://github.com/magurotuna/process_global_bench Comparing results with/without
|
…global-based-on-55d345b
…global-based-on-55d345b
…and#27562) This commit makes `process` global always available in Node context. `process` global was previously available explicitly in `deno_node`, but then got removed in denoland#25291 and made globally available regardless of whether it's in Deno or Node context, so this commit does not have any effect on Deno CLI. However, for users who want to use `deno_node` ext only, it makes sense to have `process` available to simulate the Node environment individually. This change may bring some negative performance impact. To measure how large the impact would be, a very simple benchmark was performed whose results can be found at https://github.com/magurotuna/process_global_bench.
This commit makes
process
global always available in Node context.process
global was previously available explicitly indeno_node
, but then got removed in #25291 and made globally available regardless of whether it's in Deno or Node context, so this commit does not have any effect on Deno CLI. However, for users who want to usedeno_node
ext only, it makes sense to haveprocess
available to simulate the Node environment solely.