Currently, Tamatoa modules collect tables/views from the database first thing, and then filters/mutates/summarizes afterwards once the database table/view is already in memory as a data frame. The idea here was efficiency: the tables/views are generally small, and so it seemed worthwhile to do one expensive operation early upon opening the tab and have subsequent summaries/updates/etc be quick.
However, this logic makes this app very inefficient as it scales to for instance be deployed on a Connect instance and have potentially multiple users at one time, for instance as described in https://solutions.posit.co/connections/db/best-practices/dashboards/. Thus all modules should be updated to build the queries as much as possible before collecting or pulling data.
Currently, Tamatoa modules collect tables/views from the database first thing, and then filters/mutates/summarizes afterwards once the database table/view is already in memory as a data frame. The idea here was efficiency: the tables/views are generally small, and so it seemed worthwhile to do one expensive operation early upon opening the tab and have subsequent summaries/updates/etc be quick.
However, this logic makes this app very inefficient as it scales to for instance be deployed on a Connect instance and have potentially multiple users at one time, for instance as described in https://solutions.posit.co/connections/db/best-practices/dashboards/. Thus all modules should be updated to build the queries as much as possible before collecting or pulling data.