Hi,

Since updating from 7.x-4.0-rc2 to 7.x-4.0-rc7 I see that the admin page for a quiz question set is very slow to load. The page is located at this page node/%/questions.

I tracked down the cause to the code below from line 1347 on quiz.admin.inc:

// Fill in hidden questions block.
foreach ($hidden_questions_query->execute() as $res_ob) {
     $id = $res_ob->nid . '-' . $res_ob->vid;
     // Add $id to hidden_questions, this way quiz_questions_form knows that it has to add a invisible row for this question.
     $hidden_questions[] = $id;
}

We have around 1400 questions defined and this page takes at least 2 minutes to load.

Suggestions?

Cheers,

Matt

Comments

harvlad created an issue. See original summary.

djdevin’s picture

I would make the jump to 5.x when you can, this code was removed.

Welsby’s picture

Just stumbled upon this, looks like it tries to put every question in the form so that the 'add existing question' functionality is instantanous, but this method doesn't scale well, and now we have > 3000 questions I'm hitting the php timeout as it tries to render the epic $form[].

For now I've just removed the question browser form component. Feels like this is more of a fundamental issue that requires a 5.x upgrade rather than a bug that can easily be fixed. We're using custom quiz modules so can't easily upgrade unfortunately.

djdevin’s picture

Status: Active » Closed (won't fix)

Yes, absolutely upgrade! We have some sites with 10,000+ questions in the bank and 5.x handles it well as it uses Views for the question bank.

4.x likely won't receive any more bugfixes