fix(DEX2-874): Fix every context rendering a second time in CDS Chart for performance#339
Merged
hcopp merged 2 commits intocoinbase:masterfrom Jan 29, 2026
Merged
Conversation
Collaborator
✅ Heimdall Review Status
✅
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
✅
1/1
|
Denominator calculation
|
24f0e4b to
9aa9ab0
Compare
hcopp
reviewed
Jan 29, 2026
| import { ThemeContext } from '@coinbase/cds-mobile/system/ThemeProvider'; | ||
|
|
||
| import { CartesianChartContext } from './ChartProvider'; | ||
| import { ScrubberContext } from './utils/context'; |
Contributor
There was a problem hiding this comment.
@avocado-cb can you run yarn nx run mobile-visualization:lint --fix?
hcopp
approved these changes
Jan 29, 2026
8 tasks
cb-ekuersch
pushed a commit
that referenced
this pull request
Jan 30, 2026
… for performance (#339) * bugfix and changelog * lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed? Why?
This improves rendering speed of line charts in JS by 31% or 13.4ms (43.1ms->29.7ms). This brings 26.8ms savings per price update in ADP due to each price change updating chart twice (a separate bug).
Root cause (required for bugfixes)
Adds a whitelist to ChartContextBridge. This reduces the number of non-skia components bridged and rendered from 250 to 9.
Benchmarks (and react component tree visualized) before/after:


UI changes
No visual differences.
Testing
I've tested this change on Coinbase ADP and Home pages in simulator. I did this by editing
cds-internalpackages locally, then installing them intoreact-nativelocally usingnpx yalcwhich was a pleasant workflow.I confirmed across Coinbase and TBA codebases with AI that only these 3 whitelisted contexts are used.
How has it been tested?
Testing instructions
Illustrations/Icons Checklist
Required if this PR changes files under
packages/illustrations/**orpackages/icons/**Change management
type=routine
risk=low
impact=sev5
automerge=false