Skip to content

Slow loading /users and /assets listings #964

@Flix6x

Description

@Flix6x

I'm noticing the /users (and the /assets) page can take seconds to load if there are many organisation accounts. Internally, the /api/v3_0/users?account_id=<id> endpoint is getting called as many times as there are organisation accounts that the user has access to, so there is great potential to speed this up. Two options that come to mind:

  1. Allow passing account_id multiple times to the users listing endpoint, so we only need to call it once. This would probably require the permission_required_for_context decorator to be enhanced to support a list of accounts.
  2. Alternatively, we stop relying on the internal API so much. For example, instead of users += get_users_by_account(account.id, include_inactive) (which uses the InternalAPI), use users += account.users and then filter out the inactive users if needed.

Arguably, option 2 is easier to implement, but option 1 actually improves API and auth capabilities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions