Importing courses is quite slow + 1 thread at once

Importing courses is quite slow + 1 thread at once

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)

དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to François-Xavier Guénan

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

Visvanath Ratnaweera གིས-
Particularly helpful Moodlers གི་པར 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 ?
In reply to François-Xavier Guénan

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

Howard Miller གིས-
Core developers གི་པར Documentation writers གི་པར Particularly helpful Moodlers གི་པར Peer reviewers གི་པར Plugin developers གི་པར
Define "nearly". That nearly worries me དགའ་འཛུམ་

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

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