I have a CRUD web application running on apps script that connects to a google sheet.
When the app starts, the entire table is loaded using an API, that takes around 15-20s.
I then use dataTables to display the rows with each row having an edit button.
When the user clicks on the edit button it uses the row Key to call another API that fetches the latest data from the sheet to prefill an edit box that opens.
My problem here is that the initial 15-20s load time is acceptable as its just one time, however, each edit box that opens for a row takes around 4-7s which becomes quite annoying when you are doing mass edits.
I wanted to know, should I use the data from the table that I called in the first API to fill the edit box, it would make the experience much smoother however data may not be latest which is another problem.
What solution should I stick to here?