Open MaximusHaximus opened 3 years ago
If this is just the result of a lot of different components requesting the same logical data in series, then it might be a good solution to implement data loader to handle coalescing/caching (https://github.com/graphql/dataloader)
Problem When loading the UI and switching pages, an excessive number of completely identical/redundant RPC requests are being made.
For example, loading the
Account
page results in 15 identical requests with payload shape: on my mainnet account17 identical requests with payload shape: are made on my testnet account
When sorting the requests by payload size (like sizes are the result of identical requests being made with identical responses returned), check out the waterfall for page load:
Expected Behavior Ideally the app would only load a logical piece of data once during page initialization/screen loads, rather than fetching the same data multiple times. Although the account detail page is the worst offender, there are duplicate requests being made for a couple of other JSONRPC calls also (4x calls to query access keys for my account, and 5x queries for
EXPERIMENTAL_protocol_config
) for the same logical data.Steps to reproduce