HomePhabricator

[Cashtab] Use promise.all to debottleneck NFT offer loadtime

Description

[Cashtab] Use promise.all to debottleneck NFT offer loadtime

Summary:
Initial release of NFT trading was not written to account for large numbers of offers and tokenIds. Lots of debottlenecking opportunities.

Big one is using promise.all to get and set agora offers.

Implement this.

Since we also want to implement promise.all to get and cache token info, and the approach is similar -- we do this in the same diff. In both cases, testing is the same, and more improvements are available.

imo worth doing this in one diff to solve the immediate problem of "this is almost unusable at current load speeds." We can optimize from here.

Test Plan:
npm test

npm start and open localhost:3000 in an incognito window. Create a wallet and navigate to the Listed NFTs screen. Note that the UI loads reasonably quick (with some spinners going for token names).

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Differential Revision: https://reviews.bitcoinabc.org/D16762

Details

Provenance
bytesofmanAuthored on Sep 14 2024, 22:03
bytesofmanPushed on Sep 16 2024, 02:28
Reviewer
Restricted Project
Differential Revision
D16762: [Cashtab] Use promise.all to debottleneck NFT offer loadtime
Parents
rABCd4fb4554f43e: [token-server] Tighten rate limits
Branches
Unknown
Tags
Unknown