Loading Dashboard was slow and got 504 error code.
We have multiple reports for the dashboard, each report can be loaded and work fine, two of them are a little slow, but can be opened. And the query for these two reports each takes about 0.2s in our database. They query from a table contains about 300000 records and one returns 100 records, one returns 20 record. But the dashboard cannot be loaded, it will keep loading and if inspect the browser console, will show error 504. We also tried to enable the cache for view and extend the timeout time, but all not working. Only if we reduce the records to 10000 in the table, the dashboard works fine. Is there any more optimization we can try to improve the performance?