Does anyone know why this specific plugin is extremely slow to load

Does anyone know why this specific plugin is extremely slow to load

by Shanon Kotey -
Number of replies: 2

Hi Team

We use the moodle plugin "Merge Users", a few weeks ago something changed and it now takes about 5 minutes to load the merge users index page. Every other page is fine.

I am trying to interpret the call graph, I think the sql functions are the problem? Specifically the "get_columns" function. The amount of calls seem normal to me, so I don't understand why its taking so long. I fished the function and ran the code directly in mysql and it seem to pull up the data reasonably fast. 

I ran the the database integrity tool and it found no errors so it's not that

Would anyone have any idea what's going on, is there something I'm not seeing?





Average of ratings: -
In reply to Shanon Kotey

Re: Does anyone know why this specific plugin is extremely slow to load

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I doubt the database functions themselves are a problem - they have far too much use in Moodle for that. Having said that, I don't think I've *ever* used the get_columns function.
In reply to Shanon Kotey

Re: Does anyone know why this specific plugin is extremely slow to load

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Naively, I don't think get_columns should be called that many times - I mean there are not that many DB tables, and the columns don't change during one request. However, perhaps there is a cache there, in which case this should be fine. You need to drill down into that. Click the function name. Where is this being called, and why, and what is it doing?