AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
39 stars 3 forks source link

Cache `search_fields()` results within a session #73

Closed matildastevenson closed 2 years ago

matildastevenson commented 3 years ago

Could use memoise to do this, or could cache in the same way as downloaded data, but this would preserve results between sessions.

mjwestgate commented 2 years ago

Follow-up: This is important because when galah_config(run_checks = TRUE) is set, every call to select_filters or select_columns (and a few others, like ala_counts) has to run search_fields first. This is very slow for something that would otherwise simply return some parsed text.

Proposed solution is:

This should work within a session without slowing package loading, while also preventing long-term storage