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

perf(utils): only extract HTML once during while loop #413

Merged
merged 3 commits into from
Aug 9, 2022

Conversation

me4502
Copy link
Contributor

@me4502 me4502 commented Jul 25, 2022

Currently this loop calls getHTML() on each cycle, when the value doesn't or shouldn't change. This extracts it to a separate variable so it's only called once.

Copy link
Contributor

@quantizor quantizor left a comment

Choose a reason for hiding this comment

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

Love this, thanks!

@quantizor quantizor enabled auto-merge (squash) August 9, 2022 13:13
@quantizor quantizor merged commit ccdb9ff into styled-components:main Aug 9, 2022
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.

2 participants