Skip to content

Comments

perf: list updates regressions and animated optimization#3409

Merged
isekovanic merged 4 commits intodevelopfrom
perf/list-updates
Feb 18, 2026
Merged

perf: list updates regressions and animated optimization#3409
isekovanic merged 4 commits intodevelopfrom
perf/list-updates

Conversation

@isekovanic
Copy link
Contributor

🎯 Goal

This PR updates addresses some performance degradations which got introduced with V9 and the redesign.

Most notably:

  • It moves the context menu shared values on a higher level and just uses them downstream (creating a lot of shared values is not free because of the amount of native bindings they imply)
  • It fixes an issue with our animated version of our MessageList, since any animated component (even ones done through createAnimatedComponent) have a sideeffect of changing the identity of the style property on every render. This is not something we can bypass, but the best we can do here is make sure that the list is memoized and the style only changes together with the data prop. This is still a tiny bit slower than a normal FlatList, however it's a good trade-off; especially since we provide a way to turn it off.
  • It makes sure that Portals are not mounted even when they aren't needed (they should default to normal empty <View /> holders which will likely get collapsed when the shadow DOM gets reconciled, but it still avoids setting up native view bindings even if this is supposed to be cheap
  • In order to preserve renderItem being stable, we introduce a precomputation of previous and next items in the list which makes sure to preserve object identity in order for us to be able to freely use those items in the list. This improves things significantly (by around 20ms per rerender specifically on very low end devices) while still keeping the stability.

🛠 Implementation details

🎨 UI Changes

iOS
Before After
Android
Before After

🧪 Testing

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@Stream-SDK-Bot
Copy link
Contributor

SDK Size

title develop branch diff status
js_bundle_size 420 KB 420 KB +598 B 🔴

@isekovanic isekovanic merged commit 682bbf6 into develop Feb 18, 2026
4 of 5 checks passed
@isekovanic isekovanic deleted the perf/list-updates branch February 18, 2026 16:00
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.

2 participants