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

Stop processing ScrollTimeline props if no animation-related properties have been declared #154

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

bramus
Copy link
Collaborator

@bramus bramus commented Sep 13, 2023

While debugging something for #153, I noticed that saveInRelationList was being called once per ruleset – even though only 1 of the processed ruleset in my test had animation-related properties declared.

This PR adds a quick perf win by bailing out early from the handleScrollTimelineProps method in case no animation-related properties have been extracted.

Copy link
Collaborator

@kevers-google kevers-google left a comment

Choose a reason for hiding this comment

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

Format nit. Let's keep to Google style guidelines.

if (...) {
  return;
}

space after if and statement on a separate line with {} even though 1 line. I'm sure, that I've violated this elsewhere, but no sense proliferating inconsistencies.

@kevers-google kevers-google merged commit 55f29d2 into flackr:master Sep 13, 2023
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