forked from KickTalkOrg/KickTalk
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Problem
Message filtering recalculates entire message array on every render, creating O(n²) complexity with large chat histories.
Impact
- Frame rate drops below 30fps with >100 messages
- UI lag during active chat periods
- Exponential performance degradation with message count
Root Cause
// MessagesHandler.jsx:27-37 - Recomputes entire filter on every render
const filteredMessages = useMemo(() => {
return messages.filter((message) => {
// Runs for every message on every updateSolution
- Implement virtual scrolling with react-virtuoso
- Pre-index messages by chatroom for O(1) lookup
- Use incremental filtering instead of full recomputation
Success Criteria
- Maintain 45+ fps with 1000+ messages
- O(1) message filtering implementation
- Virtual scrolling with windowing
Files to Modify
src/renderer/src/components/Messages/MessagesHandler.jsx- Add virtual scrolling components
Priority: P1 (High)
Estimated Effort: 3-4 days
Reactions are currently unavailable