Skip to content

demo(speed): tanstack in critical path #539

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

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

greatgitsby
Copy link
Contributor

@greatgitsby greatgitsby commented Apr 9, 2025

like #514, but for every critical path network request

the only things that get fetched on-demand are:

  1. map coordinates
  2. qcam stream URL

(only fetched once, then cached for as long as the page is open)

everything else is loaded from Dashboard or RouteList initial load

not meant to merge as it needs lots of polish and can be done in less lines, this is for demo purposes only

Screen.Recording.2025-04-08.at.10.53.07.PM.mov

notes:

  1. we could technically optimistically fetch more data (see docs), but it might add too much up front network pressure

@greatgitsby greatgitsby changed the title refactor: tanstack in critical path demo: tanstack in critical path Apr 9, 2025
Copy link

github-actions bot commented Apr 9, 2025

Changes:

path lines diff
./pages/dashboard/activities/RouteActivity.tsx 124 +33
./App.browser.test.tsx 60 +20
./components/RouteStaticMap.tsx 84 +17
./api/query-client.ts 18 +9
./pages/dashboard/Dashboard.tsx 167 +8
./components/RouteVideoPlayer.tsx 194 +6
./components/RouteActions.tsx 129 +6
./pages/dashboard/activities/DeviceActivity.tsx 156 +1
./pages/dashboard/components/RouteList.tsx 151 -7

Total lines: 4571 (+93)

Copy link

github-actions bot commented Apr 9, 2025

deployed preview: https://539.connect-d5y.pages.dev

Welcome to connect! Make sure to:

  • read the contributing guidelines
  • mark your PR as a draft until it's ready to review
  • post the preview on Discord; feedback from users will speedup the PR review

Mobile

Desktop

@greatgitsby greatgitsby changed the title demo: tanstack in critical path demo(speed): tanstack in critical path Apr 9, 2025
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.

1 participant