mod/quiz/attempt is verly slow, flame graph is attached

Re: mod/quiz/attempt is verly slow, flame graph is attached

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That query comes from context_module::instance, which is called in many places in Moodle.

That one call is exactly that: one call (to get the context of the quiz that the quiz attempt belongs to). That is not your problem.

The thousands of calls to that query are coming form somewhere else. You need to find where the thousands of calls are coming form, not the one.

The short form of the stack trace is much better. The nicest format for errors I know is what PHP outputs when you tell it to display HTML error messages. There is a typical screen-grab on http://jpgraph.net/download/manuals/chunkhtml/ch13s07.html