Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance optimization: Don't load all attempts on start #72

Closed
muqiuq opened this issue Dec 11, 2018 · 1 comment
Closed

Performance optimization: Don't load all attempts on start #72

muqiuq opened this issue Dec 11, 2018 · 1 comment
Assignees

Comments

@muqiuq
Copy link
Collaborator

muqiuq commented Dec 11, 2018

If a quiz attempt is started, studentquiz has to make number of questions times 2 inserts into the db. This can take a lot of time until the quiz starts. If the quiz is not finished, there are a lot of unused data in the database.
This should be changed. The question_attempts and question_attempt_steps db entries should inserted, when the specific question is beeing loaded.

@frankkoch
Copy link
Member

Just to clarify: if a quiz is started, StudentQuiz used to prepare the quiz by inserting 2 records for each question into the database. In case of a huge set of questions, this caused slow loading of the quiz. Also, this data remained in the db, even if the quiz was not completed.

This performance optimization makes inserts for a specific question only once it's loaded, not for all questions at the start of a quiz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants