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

ListLayout cache invalidation fixes #935

Merged
merged 3 commits into from Aug 12, 2020
Merged

ListLayout cache invalidation fixes #935

merged 3 commits into from Aug 12, 2020

Conversation

devongovett
Copy link
Member

Fixes a few issues with cache invalidation in ListLayout.

  1. In the ComboBox PR, a change was introduced to create a new cache object rather than reusing the old one on each layout pass. This caused cache hits and their children to no longer be cached for future layouts. This is fixed by storing the node as part of the LayoutNode and comparing the cached node vs the current node, rather than storing a separate map.A
  2. A separate cache in layoutInfoToStyle was not invalidating because we mutated LayoutInfo objects, and also because it depends on the parent layoutInfo as well to compute the absolute position. This is now checked before reusing the cached value.

@adobe-bot
Copy link

Build successful! 🎉

@adobe-bot
Copy link

Build successful! 🎉

Thank you! <3

Co-authored-by: Devon Govett <devongovett@gmail.com>
@adobe-bot
Copy link

Build successful! 🎉

@dannify dannify merged commit 1406034 into main Aug 12, 2020
@dannify dannify deleted the listlayout-cache branch August 12, 2020 21:24
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.

None yet

5 participants