Open taavilooke opened 8 months ago
There's no API for in-flight-filtering for Sheets.
Most of the current delay is due to multiple round-trips for authentication and the API. The size of the data plays a relatively small role for any foreseeable future.
The csv representation of the whole database is about 71kB now at 470 entries.
It's important to note, that this 71kB will never be shipped to client but are exchanged between AWS and GCP.
We do perhaps need to optimize it at some point and have some sort of a cache in between.
I noticed that right now the code fetches the whole database each time a card is checked. It works fine right now, there's a slight delay, but as more cards get added, this might become a problem.
https://github.com/rauno56/climbing-card-check/blob/50f2d2004dba00f3589d60879ec623e39b924227/api/_db.js#L52