-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve performance in large signature request confirmations #26209
Conversation
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26209 +/- ##
===========================================
- Coverage 69.98% 69.97% -0.00%
===========================================
Files 1409 1409
Lines 49856 49849 -7
Branches 13779 13778 -1
===========================================
- Hits 34887 34880 -7
Misses 14969 14969 ☔ View full report in Codecov by Sentry. |
Builds ready [ec23860]
Page Load Metrics (134 ± 151 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
I confirm I also see a massive improvement in both cases now 🔥 perf-fix-singatures.mp4 |
Description
Improve the performance when rendering large signature request confirmations.
After profiling within the browser, this appeared to ultimately be caused by the token list selectors which were firing repeatedly on the un-memoized token list, and in turn repeatedly converting it to a list and then comparing keys one at a time via a
find
.This PR optimises those selectors using deep equal comparison and alternate selectors when the remote token list should always be used. In addition, case insensitive comparison should not be needed since both the remote and static token lists use lowercase addresses.
Related issues
Fixes: #26129
Manual testing steps
See issue.
Screenshots/Recordings
Before
legacy_before.mov
redesigned_before.mov
After
legacy_after.mov
redesigned_after.mov
Pre-merge author checklist
Pre-merge reviewer checklist