Closed samussiah closed 1 month ago
Unfortunately the slow-down is deep inside {gt}, specifically in gt:::dt_styles_set()
(inside gt::data_color()
, which is called by our data_color_rag()
). That's the function that actually sets up colors once everything has been figured out about where colors go, so nothing we can do in front of that will speed things up noticeably.
I think our only option would be to subset the data, for example to only include rows that have ever had flags. On my machine, rendering the report with all of reportingResults
went from 37.54s to 2.83 seconds with this filter:
dplyr::filter(
dplyr::if_any(dplyr::all_of(date_cols), ~!is.na(.x) & .x != 0)
)
Getting rid of the background coloration DRAMATICALLY sped things up. See next PR.
Oops meant to close the PR.
Feature Details
With more and more snapshots the flags over time table takes a long time to render. Would be good to figure out how to speed up the process.
Example Code
Possible Implementation
Additional Comments