pancake-frontend
pancake-frontend copied to clipboard
fetch pools prices in parallel rather than sequential
Making pool page initial load faster by loading all pool prices in parallel rather than sequential. Especially when the Llama pricing API is used this massively reduces pools load time for users with high latency connections like common on mobile. There was a race condition in the past where .map with the async callback was not correctly awaited, but this was fixed by introducing a sequential for loop rather than awaiting it correctly.
PR-Codex overview
This PR introduces an asynchronous mapping function to fetch public data for pools.
Detailed summary
- Changed for loop to
Promise.all
with async mapping function for fetching pool data - Improved efficiency by fetching data asynchronously
- Updated dispatch of pools public data to use the asynchronous mapping function
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}
⚠️ No Changeset found
Latest commit: 619fec26081d28848fdcbf63fcf574fd93aaef12
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@simone1999 is attempting to deploy a commit to the PancakeSwap Team on Vercel.
A member of the Team first needs to authorize it.
Deployment failed with the following error:
The Preview Deployment Suffix domain "pancake.run" doesn't point to Vercel nameservers. Learn more: https://vercel.link/3a1