catalyst / moodle-fileconverter_librelambda

A Libre Office document converter for Moodle leveraging AWS Lambda
https://moodle.org/plugins/fileconverter_librelambda
Other
23 stars 18 forks source link

Convert speed #29

Open lneoj opened 4 years ago

lneoj commented 4 years ago

Hi there, The integration to Moodle is very simple and straight forward, took 5min to confgure it but what I could not figure it out is the speed of conversion.

If I do upload DOCX file 38kb in size as Moodle assignment and then click Grade, it will start generating PDF file for minimum of 30 seconds. Some files take 5 minutes to convert. My question is do I missing some conguration?

I tried to execute CLI command (files/converter/librelambda/cli/test.php --keyid=...) with the same document TestAssignment.docx with following result:

== Uploading test file == Test file uploaded Checking conversion, please wait... (1 minute 22 seconds wait time) File conversion sucessful. (Yay!)

This took 1min 22sec to get the Yay!

Both Moodle and S3 Bucket are in Sydney Datacentre. I did try AWS EC2 machine in the same region as S3 Bucket but the waiting time is the same.

How do I troubleshoot furtner?

Thank you, J

lneoj commented 4 years ago

A quick update,

While file been processing from Moodle I open both Buckets input and output puckets.

It seems that the file appear in input backet instantly but converting takes around 1 minute then within one second go to output bucket and back to Moodle where then CLI moodle script finishes.

So the main problem is with S3 convert, is there something that I can configure on AWS side to speed it up or this is normal behavour.

Regards, J

aspark21 commented 4 years ago

You do have the cron running on your site right?

The assignment conversion scheduled task should proactively convert submissions into PDF and image layers ahead of any teacher grading through the interface.

So I’m not sure why you are so focused on the time it takes to convert, since that shouldn’t really come into play 99.99% of the time since all the work is done ahead of time

Scheduled task runs every 15mins by default if you have a small site you could change it to run more often e.g. every 1 or 5 minutes