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

[Bridge] UIColor cache fills up when animating colors #1533

Closed
ide opened this issue Jun 6, 2015 · 2 comments
Closed

[Bridge] UIColor cache fills up when animating colors #1533

ide opened this issue Jun 6, 2015 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ide
Copy link
Contributor

ide commented Jun 6, 2015

See #1513. The issue is that animating a color quickly fills up the color cache. We probably want to:

  • Cap the size of the cache and implement a policy like Least Frequently Used or segmented LRU
  • Change the caching policy when the color is animated (e.g. MRU, or don't cache at all. But if the animation repeats it could be helpful to have cached the values.)

cc @sahrens @nicklockwood @vjeux for thoughts

@sahrens
Copy link
Contributor

sahrens commented Jun 6, 2015

Oh yeah, forgot about the color cache. Another approach is to maintain a frequency map of usage that is periodically periodically reset (never more than 10 entries or something). Then you only cache elements if they have multiple counts in the map.

On Jun 5, 2015, at 11:06 PM, James Ide [email protected] wrote:

See #1513. The issue is that animating a color quickly fills up the color cache. We probably want to:

Cap the size of the cache and implement a policy like Least Frequently Used or segmented LRU
Change the caching policy when the color is animated (e.g. MRU, or don't cache at all. But if the animation repeats it could be helpful to have cached the values.)
cc @sahrens @nicklockwood @vjeux for thoughts


Reply to this email directly or view it on GitHub.

@ide
Copy link
Contributor Author

ide commented Aug 15, 2015

Color cache now limits to 128 entries.

@ide ide closed this as completed Aug 15, 2015
@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants