Page MenuHomePhabricator

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

Authored by bytesofman on Sep 14 2024, 22:21.

Details

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).

Diff Detail

Repository
rABC Bitcoin ABC
Branch
no-ui-lock-tokens
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30286
Build 60099: Build Diffecash-lib-tests · cashtab-tests
Build 60098: arc lint + arc unit

Event Timeline

remove debug logs, use promise.all for tokens too

bytesofman edited the test plan for this revision. (Show Details)

conviction on whether or not we need to cache a tokenId

This revision is now accepted and ready to land.Sep 16 2024, 01:08