-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Description
Significant performance issues noticed after migrating long-running courses with large volumes of discussion data to MySQL backend.
For a course with around 8000 threads and around 31000 comments, the get threads list API takes around 2 mins to respond and often just times out.
Open edX Release - Sumac
forum release - 0.2.0
Potential Cause
Apart from some DB queries which could be further optimized, the performance issue mostly seems to be arising due to the to_dict methods defined in models in the MySQL backends (Example : Comment to_dict() and ForumUser to_dict()), which in turn recursively fetches data from other models.
I created a POC to optimize the get threads list API and the response time in a sandbox with similar volumes of sample data came down to around 3s. Here, I did the following: