Skip to content

GET /v3/roles is slower than v2 user summary #1618

@cloudmarius

Description

@cloudmarius

Issue

Getting the roles for a given user is slower via v3 than via v2.

Context

      "cloud_controller_v2": {
         "href": "...",
         "meta": {
            "version": "2.148.0"
         }
      },
      "cloud_controller_v3": {
         "href": "...",
         "meta": {
            "version": "3.83.0"
         }
      }
cf -v
cf version 6.51.0+2acd15650.2020-04-07

Steps to Reproduce

cf curl "/v3/roles?user_guids=:guid&per_page=500"
cf curl "/v2/users/:guid/summary"

Expected result

GET /v3/roles?user_guids=:guid&per_page=500 must not be slower than GET /v2/users/:guid/summary.

Current result

The v3 endpoint takes twice as long on average to return the results.
Eg: given a user with 135 roles

  • v3 returns aprox. 130Kb in 2.6 seconds
  • v2 returns aprox. 100Kb in 1.2 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions