Page MenuHomePhabricator

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

Authored by bytesofman on Sat, Sep 14, 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.Mon, Sep 16, 01:08