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
For a Constance setup that has many many values, and to optimize for speed, get_values() is more expensive than it could be.
def get_values(): # <-- No arguments, gets all the values
"""
Get dictionary of values from the backend
:return:
"""
# First load a mapping between config name and default value
default_initial = ((name, options[0])
for name, options in settings.CONFIG.items())
# Then update the mapping with actually values from the backend
initial = dict(default_initial, **dict(config._backend.mget(settings.CONFIG)))
return initial
I was wondering if there's interest in modifying this function to allow for optionally specifying which values to get. I could make a PR for it. (cc/ @syre )
Thanks!
The text was updated successfully, but these errors were encountered:
Describe the problem
For a Constance setup that has many many values, and to optimize for speed,
get_values()
is more expensive than it could be.I was wondering if there's interest in modifying this function to allow for optionally specifying which values to get. I could make a PR for it. (cc/ @syre )
Thanks!
The text was updated successfully, but these errors were encountered: