[🐛] Performance Issue: MessageList Component Re-render Behavior
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- react-native, typescript
Research direction
Start with package/src/components/MessageList/MessageList.tsx around line 658 and reproduce the reported behavior using the attached DevTools Profiler recording as a reference. Compare list updates and scrolling, then determine the expected rerender behavior for large or frequently updated lists. Done should include a reproducible diagnosis and a clearly validated performance outcome.
Written by the indexing model from the issue text.
Description
Issue
Hello! 👋 In our React Native app, we are using the GetStream library and have encountered a performance issue with the MessageList component. It appears to rerender all the messages in the list on every change to the list data (e.g., adding new messages or updating existing ones). Additionally, during scrolling, we’ve observed that the entire list sometimes rerenders continuously, further impacting performance. This behavior leads to noticeable lag and reduced app performance, especially when working with a large dataset or frequent updates to the message list. We have tested the component using the default settings without overriding any internal components, but the issue persists.
We have noticed that the component seems to lack perf optimizations, such as the use of useMemo or useCallback. Could you provide any information about the expected performance of the MessageList component? Are there existing optimizations to address these issues, or are there plans to improve its performance in future updates?
Additionally, I am attaching a recording from the simulator showing an example of the application re-rendering where MessageList is used, with a visualization using the DevTools Profiler:
console.log for message Message YYY rendered X times is added here.
https://github.com/user-attachments/assets/23846116-cce6-4b0f-a535-2acac872e2ee
Any guidance or recommendations would be greatly appreciated. 🙇
Steps to reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
etc...
Expected behavior
Project Related Information
Customization
Click To Expand
# N/A
Offline support
- I have enabled offline support.
- The feature I'm having does not occur when offline support is disabled. (stripe out if not applicable)
Environment
Click To Expand
package.json:
# N/A
react-native info output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- iOS
- Android
- iOS but have not tested behavior on Android
- Android but have not tested behavior on iOS
- Both
stream-chat-react-nativeversion you're using that has this issue:e.g. 5.4.3
- Device/Emulator info:
- I am using a physical device
- OS version:
e.g. Android 10 - Device/Emulator:
e.g. iPhone 11
Additional context
Screenshots
Click To Expand
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 379
- Avg merge
- 12h 33m
- Merged PRs (30d)
- 108
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GetStream/stream-chat-react-native
-
Feature Request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
GetStream/stream-chat-react-native#3091 · 10 comments · 3 reactions ·
Maintainers usually reply within 1 day
-
Feature Request
Difficulty 4/5 3-5 days Newbie friendliness 38/100
GetStream/stream-chat-react-native#2990 · 1 comment ·
Maintainers usually reply within 1 day
All issues in GetStream/stream-chat-react-native
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
TriliumNext/Trilium#12837 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
LibreChat-AI/LibreChat#18944 ·
Maintainers usually reply within 1 day
-
bug root-cause:found
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
openchamber/openchamber#7620 · 1 comment ·
Maintainers usually reply within 2 days
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Anatomik5/codetovideo#8 ·
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day