-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance improvements during layout calculation (#122)
* Performance improvements during layout calculation Both `invalidateSectionMaxYsCacheForSectionIndices` and `invalidateEntireSectionMaxYsCache` do linear passes. These are called on each section header, section footer and background. Leading to a lot of work being done with long lists. This PR short circuits the work if we try to remove header, footers and backgrounds that don't exist. A better option would be to run the calls above once per update vs per update item. That would require a bit more rework though. * Update MagazineLayout/LayoutCore/ModelState.swift Co-authored-by: Bryan Keller <[email protected]> * Update MagazineLayout/LayoutCore/ModelState.swift Co-authored-by: Bryan Keller <[email protected]> * Update MagazineLayout/LayoutCore/ModelState.swift Co-authored-by: Bryan Keller <[email protected]> --------- Co-authored-by: Elfred Pagan <[email protected]> Co-authored-by: Bryan Keller <[email protected]>
- Loading branch information
1 parent
bfc6077
commit 2d0d4f9
Showing
2 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters