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

fix: optimize getGlobalCacheKey #14455

Merged
merged 2 commits into from Aug 29, 2023

Conversation

Connormiha
Copy link
Contributor

Summary

I did a little optimization for caching process.env.
The fact is that reading process.env is not a fast operation, because it is not an ordinary JavaScript object.

A little test example https://gist.github.com/Connormiha/83ab13e08fa8769336253c085b437311

With env: 7.077ms
With cache env: 0.665ms

Test plan

@netlify
Copy link

netlify bot commented Aug 27, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 920bb75
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/64ed8c303c220a00089719c4
😎 Deploy Preview https://deploy-preview-14455--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@mrazauskas mrazauskas left a comment

Choose a reason for hiding this comment

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

Oh wow... That’s very useful to know. Thanks!

@SimenB
Copy link
Member

SimenB commented Aug 29, 2023

There are no cases where we support changing this at runtime, I guess?

Jest itself doesn't ship with this, but it's used by RN

@SimenB SimenB merged commit f2c78d0 into jestjs:main Aug 29, 2023
9 of 10 checks passed
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants