⚡ Bolt: [performance improvement] Add React.memo to NotificationListItem#419
Conversation
Co-authored-by: ClarusIubar <101549899+ClarusIubar@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
검토 결과: 방향은 유용하지만 원본 상태 그대로는 효과가 약했습니다. 보강한 내용:
검증:
이제 단순 memo 추가가 아니라 실제 shallow compare가 작동하는 prop 경계가 생겼으므로 merge 가치가 있습니다. |
Acknowledged. Thanks for providing the additional context and showing how to make the optimization effective by stabilizing props ( |
💡 What: Wrapped
NotificationListItemwithReact.memo().🎯 Why: To prevent unnecessary O(N) re-renders of all notification items when the parent
NotificationPanelre-renders due to unrelated state changes (e.g.,busyIdorunreadCount).📊 Impact: Reduces reconciliation overhead for the notification list.
🔬 Measurement: Verifiable via React DevTools Profiler by interacting with notifications and observing that unmodified items do not re-render.
PR created automatically by Jules for task 2732828983021961273 started by @ClarusIubar