You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Local vocabularies in a YAML file are read from disk fresh for each call to the #all, #search, and #find operations. This can mean that the full file is read, and the in-memory YAML structure allocated/gc'd multiple times in a typical form operation. This is especially an issue for larger vocabularies
We should optimize this to hold the YAML data structures in memory while the application running. I think this is slightly more complex than a simple instance variable, since the Authority instances may be initialized repeatedly. Something like a singleton wrapping the YAML is probably called for.
This looks in the QA's config/authorities/linked_data directory and the same directory in the app that includes QA. The downside of reading in through an initializer is that it requires a server restart to pick up configuration changes and new configurations. But since these don't change very often, that hasn't been an issue thus far.
Local vocabularies in a YAML file are read from disk fresh for each call to the
#all
,#search
, and#find
operations. This can mean that the full file is read, and the in-memory YAML structure allocated/gc'd multiple times in a typical form operation. This is especially an issue for larger vocabulariesWe should optimize this to hold the YAML data structures in memory while the application running. I think this is slightly more complex than a simple instance variable, since the Authority instances may be initialized repeatedly. Something like a singleton wrapping the YAML is probably called for.
See: https://github.com/samvera/questioning_authority/blob/master/lib/qa/authorities/local/file_based_authority.rb#L28
The text was updated successfully, but these errors were encountered: