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

Removed unnecessary int cast to avoid Integer allocations #1927

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

pablorengo
Copy link
Contributor

This pull request attempts to reduce Integer allocations when using an animation that has a ValueCallback to change some colors.

Resolves #1926

@gpeal
Copy link
Collaborator

gpeal commented Oct 19, 2021

@pablorengo I'm a bit surprised that this actually eliminates the auto-boxing. Were you able to verify that this achieves that?

@pablorengo
Copy link
Contributor Author

@gpeal I'm also surprised. You can check the issue-repro module in the master branch of the fork. After applying this change no more allocations are being made.

@gpeal gpeal merged commit 8ae55a9 into airbnb:master Oct 19, 2021
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.

Unnecessary allocations in ColorKeyframeAnimation.getIntValue()
2 participants