icssc / AntAlmanac

A course exploration and scheduling tool for UCI Anteaters
https://antalmanac.com
MIT License
54 stars 64 forks source link

Replace public mapbox token #718

Closed EricPedley closed 11 months ago

EricPedley commented 11 months ago

Instead of having a public token, have a server that can proxy requests or something. We have about 20 days to do this 😳 image

EricPedley commented 11 months ago

Turns out we exceeded the free tier because usage of the map spiked around the first day of classes. image

ap0nia commented 11 months ago

A (possibly) difficult issue to tackle is how we could minimize the number of map requests made for the routing (if at all possible). You can view the many, many requests made for routing if you open the network tab and repeatedly switch between the selected day.

image

I'm not looking too closely at the map right now, but a big reason for why this occurs should be a result of how the data fetching of each route is tied to its rendering, i.e. the component fetches route data when its corresponding day is selected and rendered. It's possible that this isn't the root cause of the issue, but it could be something to consider in a followup.