The current (December 2021) version of galah_config in the dev branch has a field called valid_fields, which is used to cache valid field names via show_all_fields(). This improves performance by reducing calls to the ALA, but is undesirable for a few reasons:
it is conceptually unrelated to the other fields in galah_config, which are about user experience
it doesn't render well, as it is stored as a vector with >700 values
it is less efficient than it could be, because show_all_fields could theoretically cache all values here and not need to re-check the atlas within a session. Ditto search_fields.
there is no reason why only show_all_fields is cached this way, but not other functions that require an ALA query, such as show_all_profiles and find_profile_attributes (though performance gain there is lower)
A potential solution is to cache show_all_ functions elsewhere, possibly hidden from the user, to improve performance. A proposed function name would be galah_cache. This could store data as tibbles within a list, which would render nicely when needed, but also prevent unnecessary calls to the ALA API.
The current (December 2021) version of
galah_config
in thedev
branch has a field calledvalid_fields
, which is used to cache valid field names viashow_all_fields()
. This improves performance by reducing calls to the ALA, but is undesirable for a few reasons:galah_config
, which are about user experienceshow_all_fields
could theoretically cache all values here and not need to re-check the atlas within a session. Dittosearch_fields
.show_all_fields
is cached this way, but not other functions that require an ALA query, such asshow_all_profiles
andfind_profile_attributes
(though performance gain there is lower)A potential solution is to cache
show_all_
functions elsewhere, possibly hidden from the user, to improve performance. A proposed function name would begalah_cache
. This could store data as tibbles within a list, which would render nicely when needed, but also prevent unnecessary calls to the ALA API.