Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_or_create_user_profile_from_slack_ids is too expensive #122

Open
JnBrymn opened this issue Feb 14, 2020 · 1 comment · May be fixed by #378
Open

get_or_create_user_profile_from_slack_ids is too expensive #122

JnBrymn opened this issue Feb 14, 2020 · 1 comment · May be fixed by #378
Labels
good first issue Good for newcomers

Comments

@JnBrymn
Copy link
Collaborator

JnBrymn commented Feb 14, 2020

get_or_create_user_profile_from_slack_ids currently goes to Slack for data upon every request. Instead it should memoize or cache the results so that at most it goes back only once per request at most - and maybe even less.

Ideas

  • get the user out of the db and only check slack if the update_at is older than some cutoff
@JnBrymn JnBrymn added the good first issue Good for newcomers label Apr 6, 2020
@mrshwah
Copy link
Collaborator

mrshwah commented Dec 9, 2020

@JnBrymn I think I improved this using the lru_cache helper in my recent PR. We can probably close once that is merged.

@JnBrymn JnBrymn linked a pull request Dec 16, 2020 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants