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

Speed up didToProfile in large queues #281

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

KevSlashNull
Copy link
Collaborator

This speeds up the didToProfile helper on the queue page if the queue
is large (say over 500 accounts). I’m not quite sure why the current
solution is this slow (up to 3s to rerender) since we should only be
looking at 2.25 million lookups maxium in a queue of n = 1500.

Generating the map initially takes around 2ms and any lookups via
didToProfile go down from around 40ms to <0.2ms.

This speeds up the `didToProfile` helper on the queue page if the queue
is large (say over 500 accounts). I’m not quite sure why the current
solution is this slow (up to 3s to rerender) since we should only be
looking at 2.25 million lookups maxium in a queue of n = 1500.

Generating the map initially takes around 2ms and any lookups via
`didToProfile` go down from around 40ms to <0.2ms.
Copy link

cloudflare-workers-and-pages bot commented Nov 18, 2024

Deploying bsky-furry-feed-admin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 28f5b4d
Status: ✅  Deploy successful!
Preview URL: https://0d54fa8f.bsky-furry-feed-admin.pages.dev
Branch Preview URL: https://kev-speed-up-didtoprofile-la.bsky-furry-feed-admin.pages.dev

View logs

Copy link

vercel bot commented Nov 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bsky-furry-feed-admin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 0:09am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
bsky-furry-feed-info ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 0:09am

Copy link

Deploying bsky-furry-feed-info with  Cloudflare Pages  Cloudflare Pages

Latest commit: 28f5b4d
Status:🚫  Build failed.

View logs

@KevSlashNull KevSlashNull merged commit 6b89f2d into main Nov 18, 2024
7 of 10 checks passed
@KevSlashNull KevSlashNull deleted the kev-speed-up-didToProfile-large-queues branch November 18, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants