-
Notifications
You must be signed in to change notification settings - Fork 48
Utilize cache infra #587
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
base: maxg/cache_2_envcache
Are you sure you want to change the base?
Utilize cache infra #587
Conversation
* maxg/cache_1_equiv: Fix testkey
* maxg/cache_2_envcache: Fix testkey
* maxg/cache_2_envcache: Fix testkey
* maxg/cache_2_envcache: Fix testkey
* maxg/cache_1_equivalency: include other TestKeys Fix testkey
* maxg/cache_2_envcache: include other TestKeys Fix testkey
* maxg/cache_2_envcache: include other TestKeys Fix testkey
* maxg/cache_2_envcache: include other TestKeys Fix testkey
* maxg/cache_1_equivalency: Cleanup
* maxg/cache_2_envcache: Merge. Cleanup
* maxg/cache_2_envcache: More tests Tests and fixes
* maxg/cache_2_envcache: Existentials for Xcode 15
* maxg/cache_2_envcache: Enable logging for test. Tweak internal env api. Log guard
* maxg/cache_2_envcache: Release 6.3.0 Assert in debug mode when large content viewer is not placed inside an interaction container Expose largeContentViewerInteraction on LargeContentViewer backing view via protocol Stopped installing xcodes in GitHub Actions file chore: Release 6.2.0 Support accessibility large content viewer Squash
watt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase this on the maxg/cache_2_envcache branch? Looks like it's got some changes from the other 2 stacked PRs mixed in.
| // Shortcut: If both environments were empty, nothing changed. | ||
| if oldValue.isEmpty && environment.isEmpty { return } | ||
| // Shortcut: If there are no changes to the environment, then, well, nothing changed. | ||
| if let layoutMode, layoutMode.options.skipUnneededSetNeedsViewHierarchyUpdates && oldValue.isEquivalent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.layoutMode is just one customization point — you should probably use something like:
self.layoutMode ?? RenderContext.current?.layoutMode ?? environment.layoutMode
which I think will match the actual mode used during layout.
| // Store bounding shapes in this cache to avoid costly recalculations | ||
| private var boundingShapeCache: [Link: Link.BoundingShape] = [:] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened to the deleted stuff in this file? intentional change, or just a bad merge?
watt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good overall, just still a few open questions/comments from the last review on this one.
johnnewman-square
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! I'd love to try this out in the Catalog app. Would it be possible to spin up a branch with the new layout settings enabled?
* maxg/cache_2_envcache: Ref semantics for caches Ref semantics for caches
3/3 for caching changes.
Design doc: https://docs.google.com/document/d/1CLhFbzZGbEKgvZTUwLuGbFY-rfZNJVTi6f3PkoZT9qI/edit?usp=sharing
Adds support for caching AttributedLabel string normalization results.
Adds support for skipping calls to setNeedsViewHierarchyUpdate when Environment and Element value changes are equivalent.
Adds support for caching MeasureableStorage measurements.