Skip to content

⚡ Bolt: Wrapped list item components in React.memo to prevent renders#2

Open
harrydbarnes wants to merge 1 commit into
tonypest0:mainfrom
harrydbarnes:bolt-react-memo-optimization-6007125879871153826
Open

⚡ Bolt: Wrapped list item components in React.memo to prevent renders#2
harrydbarnes wants to merge 1 commit into
tonypest0:mainfrom
harrydbarnes:bolt-react-memo-optimization-6007125879871153826

Conversation

@harrydbarnes
Copy link
Copy Markdown

🎯 Why: These components are rendered in lists (Queue, ActivityLog, profiles-grid). When the parent components re-render (e.g. when polling fetches new queue state or current track changes), all children in the lists were re-rendering even if their individual props had not changed.

📊 Impact: Eliminates unnecessary re-renders for list items, particularly noticeable in the Queue panel which can contain up to 200 items that were all re-rendering every 30 seconds or on track change.

🔬 Measurement: Verify by observing React DevTools Profiler while using the queue or profile tabs. The number of renders for QueueTrack, LogEntry, and ProfileCard will be significantly reduced.

…sary re-renders

Wrapped `QueueTrack`, `LogEntry`, and `ProfileCard` components with `React.memo()`. This prevents these components from unnecessarily re-rendering when their parent lists update, leading to better rendering performance especially for the queue panel which can show up to 200 tracks.
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