Performance issues with large volumes of discussion data
@taimoor-ahmed-1 is already working on this.
Since Oct 16, 2025.
- Dominant language
- Python
- Stars
- 5
- Forks
- 26
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 2
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:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.