FMCorz / mdk

Moodle Development Kit. A collection of tools meant to make developers' lives easier.
GNU General Public License v3.0
85 stars 47 forks source link

MDK runs incredibly slowly #155

Open DanBennettUK opened 7 years ago

DanBennettUK commented 7 years ago

This may just be an issue for me, but I'm finding MDK is taking an absolute age to run a command.

For example;

mdk create --version 27 --engine mariadb --install -n 27

It'll sit there for about 10 minutes or so, until eventually going on. If I attempt to cancel it (CTRL-C) it actually starts running it, but then cancels it anyway.

Is there something wrong with my build? Or am I not alone? 💃

FMCorz commented 7 years ago

Hi Dan, How long does installing Moodle from the command line usually takes (without MDK)?

DanBennettUK commented 7 years ago

Usually not long at all, the slowest part is checking out the branch. But MDK doesn't even start to create the instance until a long wait.

It's almost as if whatever MDK script I run, it doesn't even start to run it until a long wait. But no output during this time unless I CTRL-C

FMCorz commented 7 years ago

How did you install MDK? Are your clones stored on the same disk?

Could you try to set debug mode on and see where it stalls?

mdk config set debug debug

DanBennettUK commented 7 years ago

Installed via pip. Everything same disk (It's a VM).

Done that, it stalls just before even starting. Yet I press CTRL-C and it finally starts;

11:22:12/var/www mdk create --version 33 --engine mariadb --install -n test33
^CCreating instance test33...
Fetching cached repository moodle.git...
/usr/bin/git fetch
Cloning repository...
/usr/bin/git clone /home/dan/.moodle-sdk/moodle.git /var/www/test33/moodle

(^C I did after a minute of no output... was going to check I had debug set properly!)

It's very strange...

DanBennettUK commented 7 years ago

https://youtu.be/4Xboau3uFiQ

Lil clip of what I mean

FMCorz commented 7 years ago

It looks like an output buffer issue to me. I can't really say why it happens, but I have experienced that in the past, here and there. Have you tried redirecting the output to a file? E.g.

mdk create -v 33 -e mariadb -i -s test > /tmp/mdk.log & tail -f /tmp/mdk.log

DanBennettUK commented 7 years ago

Even that, it sits there for a long time before anything is output to /tmp/mdk.log. Just nothing happens. Only having this with MDK hence raising it here 😢 Hmm!