open-bounty
open-bounty copied to clipboard
Status team member check taking an awful amount of time
Type: Bug
Description
commiteth.github.core.status-team-member?
fn is invoked during initial user profile loading, and it can take up to 4-5 seconds to complete. It checks whether currently logged-in user is a member of Status org on GitHub or belongs to Status team. If the return value is true, Usage Metrics tab becomes visible. Execution times are so long due to multiple GitHub API queries.
The problem is that user profile data is not initialized completely until it finishes, and this may result in longer wait times for e.g. 'My Payment Details' screen to load.
Solution
- Perhaps use some kind of whitelisting instead, so that no API calls are involved
- Or separate this check from user profile loading, so that it runs asynchronously
@siphiuel How could it be easily reproduced in production? I'm trying to get that delay but can't feel it right now. :S
The delay will be there once https://github.com/status-im/open-bounty/pull/263 is merged. It causes the queries to /api/user
to execute longer.
Aah, okay! :)