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 10.10.0 is not caching env variables (slow "getenv") #22960

Closed
KindWizzard opened this issue Sep 19, 2018 · 2 comments
Closed

Node 10.10.0 is not caching env variables (slow "getenv") #22960

KindWizzard opened this issue Sep 19, 2018 · 2 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@KindWizzard
Copy link

KindWizzard commented Sep 19, 2018

Version: 10.10.0
Platform: Darwin 17.7.0 xnu-4570.71.2~1
Docker: node:10-slim

In the environment in which we run Node.js, is about 5,000 env variables. With such a large value of variables, it takes much longer to read them. The problem is that Node.js does not cache the result of getenv method call. As a result, the performance of the application falls critically.

That's how the bottom of the flame graph looks like:

screen shot 2018-09-20 at 00 12 49

Half of the execution time is spent reading env-variables.

@AyushG3112
Copy link
Contributor

Can't you implement caching on your end?

@richardlau
Copy link
Member

See #3104 for previous discussion.

@richardlau richardlau added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

4 participants