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.
Related Issue
Motivation and Context
I was working with long lists and was getting a significant amount of hangs.
This was before the change:
Details
Both
invalidateSectionMaxYsCacheForSectionIndices
andinvalidateEntireSectionMaxYsCache
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.
Related Issue
Motivation and Context
I was working with long lists and was getting a significant amount of hangs. This was before the change:
This was after:
How Has This Been Tested
Tested in the airbnb app.
Types of changes
Checklist