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
{{ message }}
Repository navigation
Request to retrieve API token can take a long time #3965
When loading the account settings page, the API token is retrieved as a separate async request. The request seems to also calculate the user's storage usage, meaning the request can take a while and during that time, the API token field appears empty to the user.
Expected behavior
Separate the request for the API token from any storage usage calculation and add appropriate loading indicators for user feedback on the page's loading state.
Hello! I hope you're doing well. I came across this issue and I would be delighted to contribute to it. Would you be able to show me the files that are involved?
I think @bjester sir is expecting you to separate the calls -- request.user.get_space_used_by_kind() and request.user.get_token() into two API endpoints. So that the expensive calculations of request.user.get_space_used_by_kind() does not affect API token loading.
Activity
akash5100 commentedon Mar 9, 2023
Hello! I hope you're doing well. I came across this issue and I would be delighted to contribute to it. Would you be able to show me the files that are involved?
vkWeb commentedon Mar 9, 2023
@akash5100 in the backend, this is the function that gets called by the frontend.
I think @bjester sir is expecting you to separate the calls --
request.user.get_space_used_by_kind()andrequest.user.get_token()into two API endpoints. So that the expensive calculations ofrequest.user.get_space_used_by_kind()does not affect API token loading.@bjester sir, am I guiding @akash5100 on the right direction?
bjester commentedon Mar 9, 2023
Yes that's right, thanks @vkWeb!