goeuropa / onebusaway-react-webapp

React web application for OBA backend
GNU Affero General Public License v3.0
0 stars 1 forks source link

Don't cache all poylines, stops, and buses at launch #4

Open aaronbrethorst opened 4 months ago

aaronbrethorst commented 4 months ago

The comment above getAllData() in reducer.ts suggests that the web app downloads all polylines, stops, and buses at launch, which seems to be borne out by what I'm seeing in the Web Inspector's Network tab: 176 requests, mostly for the stops-for-route endpoint—of which I probably won't look at.

I think this function should just be removed altogether and we should use stops-for-location as the primary way of finding data to render on-screen, just like in the mobile apps.

I've opened a separate task for the stops-for-location work, which you can find at #5.

Michal-Radomski commented 4 months ago

app-loading The intention was to show all lines and buses at the beginning. You can double-click on a line and only that line will be displayed. At the beginning, vehicles from active lines are downloaded, after 2s polylines. A big disadvantage is a lot of requests. Maybe make settings and save in localStorage?

Michal-Radomski commented 4 months ago

Stops are displayed if you zoom in.