Skip to content

Bug 2057561 - Optimize array mapping and siblings rerenders (Fix 3) - #9751

Open
davidmiculit wants to merge 1 commit into
mozilla:masterfrom
davidmiculit:feat/2057561-fix3
Open

Bug 2057561 - Optimize array mapping and siblings rerenders (Fix 3)#9751
davidmiculit wants to merge 1 commit into
mozilla:masterfrom
davidmiculit:feat/2057561-fix3

Conversation

@davidmiculit

Copy link
Copy Markdown
Collaborator

Bug 2057561 - Improve frontend performance on Graphs View

Toggling the visibility of a single series unnecessarily maps over the entire testData array and triggers expensive re-renders for all sibling LegendCard components.

Fix:

  • Wrap LegendCard in React.memo with a custom comparator on series.signature_id + series.visible.
  • Refactor the updateSelectedTest visibility-toggle handler to bypass the full-array .map(). It now performs an O(1) immutable single-item update by finding the target index, cloning the specific item, and rebuilding the array using slice.

@netlify

netlify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy Preview for treeherder ready!

Name Link
🔨 Latest commit 984204c
🔍 Latest deploy log https://app.netlify.com/projects/treeherder/deploys/6a70a34e435bb10007815fcd
😎 Deploy Preview https://deploy-preview-9751--treeherder.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@davidmiculit davidmiculit changed the title Bug 2057561 - Optimize array mapping and siblings rerenders Bug 2057561 - Optimize array mapping and siblings rerenders (Fix 3) Aug 3, 2026
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