Mobile Course Enrollment API: performance degrades with number of enrolled courses

Description

While testing on stage, we noticed the mobile Course Enrollment API times out before responding when learners have more than N courses. It doesn't timeout with 9 enrolled courses, but it does with 20 enrolled courses.

https://courses.stage.edx.org/api/mobile/v0.5/users/USERNAME/course_enrollments/

This issue was introduced with https://github.com/edx/edx-platform/pull/13235.

FYI - There were 3032 courses available in the catalog.

Steps to Reproduce

None

Reason for Variance

None

Release Notes

None

Customer Problem Statement

None

Status

Assignee

Wajeeha Khalid

Reporter

Nimisha Asthagiri

Labels

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Sub-Team(s)

None

Reach

None

Impact

None

Open edX Discourse Thread

None

Components

Sprint

None

Fix versions

Priority

Unset
Configure