Comments (13)
When I've 11 cards, https://regen.bingo/my-cards takes a couple of seconds to load. It should load immidiately.
So, was it a rendering issue or took a while to fetch from the contract?
from regen-bingo.
It must be about how we fetch the contract; rendering cannot take this long. I'm profiling it now.
from regen-bingo.
There are infinite number of fetches for the tokenURI; there is a bug on that.
from regen-bingo.
If we use limit&offset while getting multiple tokens from the contract we are going to need a count function too. And this makes us have to sort the tokens in decreasing order by match count "on the contract". I don't think this is suitable for gas price.
![]()
There are infinite number of fetches for the tokenURI; there is a bug on that.
I know the fix, done in my local. Will be pushed with pagination feature.
from regen-bingo.
Please make different fixes in different commits and branches.
from regen-bingo.
The first tokenURI calls are finalized in t1.8s but the first render begins at t8.2s.
from regen-bingo.
The first tokenURI calls are finalized in t1.8s but the first render begins at t8.2s.
![]()
![]()
This leads us to decoding the response and creating Card object is taking long. I'm going to optimize it then?
from regen-bingo.
Please make different fixes in different commits and branches.
Done in #47
from regen-bingo.
Thanks!
from regen-bingo.
This issue is not fixed yet. I tried /my-cards again on the deployment of ac8f4f5. It took 9 seconds. Below is the performance display of Brave:
There are 4 visible requests to the smart contract; and the render happens only after the last one.
from regen-bingo.
This issue is not fixed yet. I tried /my-cards again on the deployment of ac8f4f5. It took 9 seconds. Below is the performance display of Brave:
![]()
There are 4 visible requests to the smart contract; and the render happens only after the last one.
Is that mean fetching cards within a for loop from the contract takes too long when deployed to Göerli? I couldn't reproduce on deployed product since I have no minted cards and minting period has ended, unfortunately.
from regen-bingo.
Perhaps, needs to be investigated. One way to do would be logging timestamps on relevant requests and seeing them in action with local and Goerli deployments.
from regen-bingo.
Perhaps, needs to be investigated. One way to do would be logging timestamps on relevant requests and seeing them in action with local and Goerli deployments.
Previous approach was;
- Fetch the tokenId
- Await tokenURI
- Await decoding and constructing the Card
- Add to a list
- After all the tokens have fetched and Cards are created, set the card's state.
This makes the contract calls last even longer. So, I've decided to update the card's state as a new card have constructed and render it immediately.
I've created another branch and tested a new approach on Göerli. I think it does fine, but this approach is to render the cards immediately after we fetch them so, cards will be loaded one by one. If you agree with me on this approach, we can display a loading spinner until all the cards are fetched at the end of the list @hantuzun.
from regen-bingo.
Related Issues (20)
- The winning card event is not going to be reflected for all visitors
- Use ERC721A with its Query extension
- Frontend: Must work in non-web3 browsers with a default provider
- Backend: Increasing cooldowns for draw numbers
- Backend: Different design for the winning card SVG
- Backend: Review revert messages
- Backend: Add new layouts
- Backend: Review tests
- Backend: Refactor drawNumbers for constant gas cos
- Deploy BokkyPooBahsDateTimeContract to Goerli just as Mainnet
- Using Wagmi Hooks HOT 1
- Audit the RegenBingo contract
- Incorporate Hatun's mobile design in the landing page mobile view HOT 1
- Use card scores in their metadata instead of making RPC calls
- New layouts with bit masking
- Stateful 2 tabs navigation for Regen Bingo. HOT 2
- Keep a "floating at bottom" banner. HOT 1
- Mobile Hero Section HOT 2
- Updating tokenURI's of CardList HOT 1
- Wallet modal does not close after disconnect/connect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from regen-bingo.