bitshares / bitshares/bitshares-ui
Optimize API usage
- Dominant language
- JavaScript
- Stars
- 520
- Forks
- 575
- Avg merge
- 12h 7m
- Merged PRs (30d)
- 5
Description
Although a lot of optimisations have already been done over the past year, the UI still makes a very large number of calls and subscribes to an excessive number of objects during normal operation.
Furthermore, by never cancelling those subscriptions, extended usage leads to a bogged down wallet and an overloaded API node.
My idea is that upon the user FIRST loading the wallet with all relevant API calls needed, we cancel all existing subscriptions and then subscribe to a) blocks b) currently selected account) c) route specific objects (market/asset/etc.) (based on the route the user is visiting).
On further navigation, we cancel the FROM route specific ones and subscribe to the TO route ones.
As an initial approach to figure it out, we could disable ALL subscriptions and see what breaks :)
Contributor guide
Research direction
Start by tracing the wallet's initial API loading and subscription setup, then compare subscriptions across route navigation. Use the proposed all-subscriptions-disabled experiment to identify required behavior; done means blocks, the selected account, and current-route objects remain subscribed while old route subscriptions are cancelled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- blockchain, frontend, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100