Importing courses is quite slow + 1 thread at once

Importing courses is quite slow + 1 thread at once

by François-Xavier Guénan -
Number of replies: 3

Hello,

I've setup Moodle so teachers can ask for a course creation, then when the request is allowed, I'm importing a nearly empty course as a template.

It takes like 180 seconds while everything else is pretty fast (dedicated server), I find this quite slow.

I've tried to launch several imports at once, but the import are made one by one. The only way to perform another import while the other is running is to launch another brower or a private window. Actually I can't do anything else (even opening any other page) while an import is running. 

Is there something I can tune in the admin panel to fix this behaviour? Is there another faster way to inject a template to an empty course? I've tried "Kickstarter" plugin but I couldn't figure out how to define a course as a template, it seems like you have to go premium for this.

Thank you very much for your advices!

Sincerely,

FX de Rennes, France

(Moodle 3.10)

Average of ratings: -
In reply to François-Xavier Guénan

Re: Importing courses is quite slow + 1 thread at once

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
180 sec for a nearly empty course, on a dedicated server? There is something wrong. Your starting point is https://docs.moodle.org/310/en/Performance_recommendations. Also see the other documents linked to the header of this course.

One question though. Why are you doing an https://docs.moodle.org/310/en/Import_course_data not a https://docs.moodle.org/310/en/Course_restore ?
Average of ratings:Useful (1)
In reply to François-Xavier Guénan

Re: Importing courses is quite slow + 1 thread at once

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Define "nearly". That nearly worries me smile

Have you done anything to investigate what the server is doing while it is creating the course? Is PHP busy? The database busy? And so on...
In reply to François-Xavier Guénan

Re: Importing courses is quite slow + 1 thread at once

by François-Xavier Guénan -
Hello and thank you for your time @Visvanath & @Howard!
I've not fixed the problem yet but I've found a workaround: I've just ticked the first box during import ("Activities and resources" or something like this (I'm using french version)).
Then the import takes like 10 seconds and the result suits my needs.
I'll checkup server settings using @Visvanath link as soon as I can, probably next summer during OS update.
Regards,

FX de Rennes, France