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
Currently, the get_keys script has a very naive implementation:
It loops through the usernames in the server_id/username and sequentially makes a request for each username
This is bad because the amount of time taken to login becomes proportional to the no of users in that file.
Possible solutions may be
Storing a cached file of keys in /tmp and then retrieving those keys if the users file hasn't changed. (Or maybe if it has changed, request only new user's keys). Can be implemented by using diff to compare if the usernames file changed. (Though we have to deal with issues like cache invalidation (what happens if a user adds a new key to his account?))
An optimization that can be made is to request the keys in parallel, instead of sequentially. Should reduce times considerably.
Open to more suggestions, welcoming PRs
The text was updated successfully, but these errors were encountered:
Currently, the get_keys script has a very naive implementation:
It loops through the usernames in the server_id/username and sequentially makes a request for each username
This is bad because the amount of time taken to login becomes proportional to the no of users in that file.
Possible solutions may be
diff
to compare if the usernames file changed. (Though we have to deal with issues like cache invalidation (what happens if a user adds a new key to his account?))Open to more suggestions, welcoming PRs
The text was updated successfully, but these errors were encountered: