refactor: retrieve routes using solid-query#514
Draft
greatgitsby wants to merge 19 commits into
Draft
Conversation
solid-query
Changes:
Total lines: 4501 (+33) |
deployed preview: https://514.connect-d5y.pages.devWelcome to connect! Make sure to:
Mobile
Desktop
|
solid-querysolid-query
greatgitsby
commented
Apr 6, 2025
| @@ -1,13 +1,36 @@ | |||
| import { VoidComponent } from 'solid-js' | |||
Contributor
Author
There was a problem hiding this comment.
this would be broken out into a separate PR
Contributor
|
The timeline still flashes for a few frames when clicking routes. There shouldn't be any resource usage there as we already have the data |
Contributor
Author
|
there is still resource usage in this file, events/statistics data requires extra requests even if we have the Route; that's why it flashes these can and will be migrated to this same method, just not now. this PR was meant to migrate only the by the time we load RouteActivity having loaded route data, there will be zero request required in RouteActivity. |
7903f55 to
97160f1
Compare
Contributor
Author
|
@sshane try this version: commaai/connect#539 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








here's another simple way to dedupe all route retrievals. when we've fetched a page, store the route in the tanstack query cache, and fetch the route in the
RouteActivityusing tanstack. this solves two major things:routes.datawill only trigger suspense if the data wasn't previously recorded). see demo video and test yourselfRouteActivityi think introduction of
solid-queryat this point is going to help solve the remaining performance requirements we have, like deduping requests and eventually introducing metadata caching like old connect. but before that, no unnecessary requests!looking for feedback and opinions on the approach
demo.mov