-
Notifications
You must be signed in to change notification settings - Fork 28
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
Improve performance of contentSize by not using a list to back it #283
Conversation
2438a49
to
618daf8
Compare
…his improves performance.
@@ -402,14 +402,14 @@ fileprivate struct TestContent : ItemContent, Equatable | |||
self.wasRemoved_calls.append(()) |
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.
Fixes build warnings in tests
/// ┌───────────┐ | ||
/// │ │ | ||
/// │ │ | ||
/// │┌─────────┐│ |
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.
This is pretty silly, feel free to leave as-is, but do you think top-aligning illustrates what will actually happen better?
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.
I'm going to ignore this given it was the same as before in the old file and I want to get this in SPOS tonight
Please do 😂
… On Mar 29, 2021, at 8:01 PM, Kyle Van Essen ***@***.***> wrote:
@kyleve commented on this pull request.
In BlueprintUILists/Sources/ListSizing.swift:
> +/// .fillParent:
+/// ┌───────────┐
+/// │┌─────────┐│
+/// ││ ││
+/// ││ ││
+/// ││ ││
+/// ││ ││
+/// ││ ││
+/// │└─────────┘│
+/// └───────────┘
+///
+/// .measureContent
+/// ┌───────────┐
+/// │ │
+/// │ │
+/// │┌─────────┐│
I'm going to ignore this given it was the same as before in the old file and I want to get this in SPOS tonight
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
This PR refactors how
ListView.contentSize
is implemented, by switching to manually allocating a layout and measuring it, instead of using a static measurement / template view. This has significant performance improvement benefits on its own of about 50%, because we're not going through the entire diff and layout loop to update the measurement view – just creating a layout and measuring it.To allow this, a few changes happened:
UICollectionView
– you really just need the layout objects and the information about the layout frame, so I cleaned that up. This involved removing references toUICollectionView
, making the delegate optional.ListSizing
to theBlueprintUILists
module – it's only used there anyway.