Performance issues with large volumes of discussion data

Aperta
#235 10 commenti 1 reazione 1 assegnatario Vedi su GitHub

@taimoor-ahmed-1 ci sta già lavorando.

Dal 16/10/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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:

  1. Optimized some queries Ref
  2. Avoided using the to_dic method Ref 1 Ref2
Lingua principale
Python
Stelle
5
Fork
28
Merge medio
12m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openedx/forum

Tutte le issue di openedx/forum

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.