Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark asset market cap queries and sorts #8188

Open
0xean opened this issue Nov 25, 2024 · 2 comments · May be fixed by #8423
Open

benchmark asset market cap queries and sorts #8188

0xean opened this issue Nov 25, 2024 · 2 comments · May be fixed by #8423
Assignees

Comments

@0xean
Copy link
Contributor

0xean commented Nov 25, 2024

  • measure performance impacts of the additional calls to get market cap of assets at runtime vs either storing a snapshotted marketcap with the asset metadata OR potentially having pre-sorted array of asset ids
  • based on the benefits measured above implement one of the solutions
  • modify the asset gen script to include an array of asset ids that is sorted by market cap or add it to the metadata
  • remove the requests to get market cap from the runtime in the app
@0xean 0xean changed the title Add array of asset ids sorted by market cap benchmark asset market cap queries and sorts Nov 25, 2024
@0xean 0xean moved this from Backlog to Up next / groomed in ShapeShift Dashboard Nov 25, 2024
@woodenfurniture woodenfurniture self-assigned this Dec 18, 2024
@woodenfurniture woodenfurniture moved this from Up next / groomed to In progress in ShapeShift Dashboard Dec 18, 2024
@woodenfurniture
Copy link
Member

Also will benchmark the cost of deserialization of cached data on boot

@woodenfurniture
Copy link
Member

Benchmarking of market data fetch on boot adds ~0.2s - ~1.5s to boot time.

Pushed a PR with opportunistic improvements to boot, mostly a nothing-burger to performance improvement:
https://github.com/shapeshift/web/pull/8399/files

Looks like:

  1. We can avoid the 0.2-1.5s request for top1000 asset market cap by preloading this at generation time
  2. We can reduce bundle size significantly in the process with custom schema mentioned in https://discord.com/channels/@me/1187105862649651342/1316873667455619082

Point 1 alone doesn't seem worth it, but since we're nearing the cloudflare limit on bundle size, this could be worth our time. Actually, this task would be more relevant to #7856 and #8047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants