Closed shrouxm closed 2 weeks ago
FYI @josebui
Triage notes:
FYI @CourtneyLee333
Hey All, I don't have a lot of experience with async tasks in django but from what Paul posted seems possible, for me this seems like a 5 points task, maybe less depending on how easy it will be to configure the async task
Thanks, @josebui! - if it's alright I will put it in the August to-do list, with the expectation that it is a lower priority than the other tasks listed.
This has been deployed to production.
Description
I did some quick and dirty log statement profiling of the backend, and it seems that the vast majority of the time spent by the backend during a login request is synchronously downloading the user's profile image and uploading it to S3.
We should do at least one of:
Either method would resolve the slow login, but I'm not sure which is more straightforward to implement at first glance.
Additional context
Specifically:
_persist_user
method of theAccountService
_update_profile_image
methodupload_url
method of theUploadService
, which downloads the file from the profile image URL, and then uploads it to S3I don't have experience with launching async tasks in django, so not sure how big a lift that is. And I don't know if the profile image URL provides information to determine if it has changed or not. I'm not even sure if we need to be storing the profile images on our own backend or if we can just use the oauth provider's profile image URL as is.