Skip to content

Bk/performance optimizations#158

Open
bryankeller wants to merge 5 commits into
masterfrom
bk/performance-optimizations
Open

Bk/performance optimizations#158
bryankeller wants to merge 5 commits into
masterfrom
bk/performance-optimizations

Conversation

@bryankeller
Copy link
Copy Markdown
Contributor

@bryankeller bryankeller commented Jun 6, 2026

Details

This is the first of two PRs to optimize MagazineLayout. I did extensive profiling, and found several hot spots.

For a collection view with 100,000 items in it, after this wave of optimizations, the time in prepare has dropped by up to 12x.

  • prepare, when the prepareMode is rebuildSectionModels: 59ms -> 5ms
  • prepare, when then prepareMode is updateLayoutMetrics: 58ms -> 15ms

How Has This Been Tested

Tested in demo app and Airbnb app. Additionally, all unit tests pass.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Perf fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@bryankeller bryankeller requested a review from brynbodayle June 6, 2026 00:02
@bryankeller bryankeller force-pushed the bk/performance-optimizations branch from c247a87 to 0f9d900 Compare June 6, 2026 00:18
@bryankeller bryankeller force-pushed the bk/performance-optimizations branch from c479981 to 90f58eb Compare June 6, 2026 05:35
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.

1 participant