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

Pagination/Streaming/Virtualisation #416

Open
oscartbeaumont opened this issue Sep 19, 2024 · 0 comments
Open

Pagination/Streaming/Virtualisation #416

oscartbeaumont opened this issue Sep 19, 2024 · 0 comments

Comments

@oscartbeaumont
Copy link
Member

tldr: need to invesigate but fine without it for now.

Right now our dashboard will fetch all data for devices, blueprints, etc which could slow down the dashboard if a tenant has a lot of resources.

Problems around pagation:

  • Cursor in the URL for sharable links
  • Start from anywhere (due to cursor being anywhere)
  • Can/should we allow browser search for fetched items outside the visible area? Maybe we just say no, use the built-in search

Questions:

  • Cursor or page-based paganation.
    • Cursor is better for DB performance and not missing data
    • Cursor doesn't allow starting in the middle cause we can't determine the scrollbar position.

Implementing virtualisation into our Table component at the same time as this would make sense.

We could also look into streaming data from the DB to client. Right now this ends up being way slower due to the inefficent design of the Planetscale HTTP adapter spec. The extra round trips kills the tail latency while only slighting slowing down the initial response. Integrating streaming with Tanstack Query's automatic refetching is hard so that doesn't help either.

I did a quick test and the dashboard can load 1000 blueprints in 2 seconds (without CF smart placement) which is acceptable for now.

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

No branches or pull requests

1 participant