Skip to content
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

Migrate to RTK for querying balances #30779

Closed
5 tasks done
onyb opened this issue Jun 2, 2023 · 1 comment · Fixed by brave/brave-core#19337
Closed
5 tasks done

Migrate to RTK for querying balances #30779

onyb opened this issue Jun 2, 2023 · 1 comment · Fixed by brave/brave-core#19337
Assignees
Labels
dev-concern feature/web3/wallet Integrating Ethereum+ wallet support front-end-change This task is a front end task and doesn't need any C++ changes OS/Desktop perf priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass-Win64 QA/Yes release-notes/include

Comments

@onyb
Copy link
Member

onyb commented Jun 2, 2023

Community https://community.brave.com/t/macos-computer-crashes-when-trying-to-send-crypto-with-brave-wallet/485399/3

Some users have been reporting very high CPU usage since at least 1.51.x, but it's been a major problem all along. brave/brave-core#18735 brings some significant performance improvements. We would like to extend this work beyond the panel to speed up the wallet page.

The problem is particularly bad when there a lot of accounts and custom networks. Since we refresh balances periodically, this leads to spikes in CPU usage like this:

image

Definition of done

  • No more await Promise.all(...) for balance queries.
  • No more tokenBalanceRegistry in the legacy Redux store.
  • Remove the custom optimisations done in Swap, and use the api slices for it.
  • No more or reduced spiking in CPU usage.
  • No more use of useBalanceUpdater() hook.
@onyb onyb added perf QA/Yes release-notes/include feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop front-end-change This task is a front end task and doesn't need any C++ changes labels Jun 2, 2023
@jamesmudgett jamesmudgett added the priority/P3 The next thing for us to work on. It'll ride the trains. label Jun 16, 2023
@onyb onyb self-assigned this Jul 18, 2023
@brave-builds brave-builds added this to the 1.58.x - Nightly milestone Jul 21, 2023
@srirambv
Copy link
Contributor

Verification passed on

Brave 1.58.109 Chromium: 116.0.5845.163 (Official Build) beta (64-bit)
Revision a4ad1fcdb550daf076384dbb280ae944274b3d35
OS Windows 11 Version 22H2 (Build 22621.2215)
  • Verified steps from brave/brave-core#19337
  • Verified able to load token balances in Portfolio
  • Verified able to load token prices in Portfolio
  • Verified able to load pricing history (graph) in Portfolio
  • Verified able to load fiat balances in Accounts
  • Verified able to load token balances in Swap
  • Verified on both panel V2 and Wallet page
19337.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-concern feature/web3/wallet Integrating Ethereum+ wallet support front-end-change This task is a front end task and doesn't need any C++ changes OS/Desktop perf priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass-Win64 QA/Yes release-notes/include
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants