-
Notifications
You must be signed in to change notification settings - Fork 11
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
Cache initial load endpoint data and use statuses endpoint to check for new data #451
Comments
Some notes: regions.json endpointThis is used for the motd and for the search, from what I can tell. This endpoint includes admin email addresses (seems like we don't need this on the endpoint at all). I propose reviewing whether it is safe to completely remove the admin email addresses. That will slightly reduce the size of the endpoint. EDIT: looks like I did that at one point but then reverted it pinballmap/pbm#1234 /regions/location_and_machine_counts.jsonThis endpoint is used by About and by SignupLogin. It doesn't seem to be an intense endpoint, but it's also unnecessary to pull it every time someone opens the app. It's only needed for those two screens. I propose I don't know. I think I would propose not pulling this on initial load, and only pulling it when those screens are visited. /location_types.jsonThis seems to be used right away by for the location type icons in "List" I propose nuttin. /machines.json /operators.jsonFrom what I can tell, these endpoints contain IDs that are used by the /locations endpoint, and are necessary to have on initial load. I propose nothing, unless it's not a terrible idea to include machine_name and operator_name in the locations/:id.json endpoint (like we do with last_updated_by_username, and like how we do on the locations/closest_by_lat_lon.json endpoint). Doing so could save us from pulling down these endpoints until needed on the Find* screens. |
Ok, latest idea is to use this new endpoint that stores that updated_at value for those four tables, indicating when/if they were recently updated https://pinballmap.com/api/v1/statuses.json We store the updated_at values for each of those status_types in redux, and parse the endpoint to compare with what we have stored. Then if the values are different, we query that full endpoint. |
See latest comment #451 (comment)
Original comment:
We can use this issue to discuss strategies to speed up initial load - though not only initial load, but also all map loads.
Caching:
Location Data:
The text was updated successfully, but these errors were encountered: