Very slow database performance

@rthatha, not a solution but a workaround suggestion here.
If server-side startup time cannot be reduced more, and if this lag is not acceptable on your side, you could try the same approach as Heidi did in her Vocab Victor Classroom App leveraging Google Firestore services.
As she says:

Serverless model: We determined that the Anvil Tables system, while handy, led to very slow performance. Therefore, we decided to use a serverless model and wrote a python + js library to read/write to Google’s Firestore. It is lightning fast, extremely reliable, and allowed us to write the entire application with very few (I think maybe three or four) server functions.*

This may apply to your case too.

BR