[SAK-37088] Low performance uploading files in DeliveryBean Created: 28-Jul-2017  Updated: 17-Apr-2018  Resolved: 01-Aug-2017

Status: Verified
Project: Sakai
Component/s: Tests & Quizzes (Samigo)
Affects Version/s: 11.4, 12.0
Fix Version/s: 11.5 [Tentative], 12.0

Type: Bug Priority: Critical
Reporter: Daniel Merino Echeverría Assignee: Neal Caidin
Resolution: Fixed Votes: 0
Labels: qaready
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relates to SAK-36229 Low performance at uploading html5 re... CLOSED
12 status: Resolved
11 status: Resolved
Previous Issue Keys: SAM-3238
Test Plan:

1) You will need to run a local version of Sakai. First configure it to store the files in the filesystem instead of the database.
2) Upload a file with a question.

The nighties are all configured like this so you should be able to test there.


A patch contributed by us (SAM-2859) that improved performance in Samigo when uploading html5 recorded audio can be applied for any kind of uploads in DeliveryBean.


Comment by Laura Gekeler [ 31-Jul-2017 ]

Could you tell us where you observed this low performance? It will assist in developing a test plan.

Comment by Daniel Merino Echeverría [ 01-Aug-2017 ]

Laura Gekeler we observed low performance when uploading big audio files recorded in tests, so we found the issue fixed in SAM-2859. After that, we have found that the bug fixed there is present in other place, so we have applied the same fix, but we haven't done performance tests with this one.

Any upload managed with DeliverFileUpload.jsp is affected, so in theory any upload done in a test should get better when the file is stored in filesystem. Uploading any file after applying the patch should be faster than uploading the same file before applying it, specially if the file is big.

However, the upload time is not deterministic. It can depend on other factors like CPU load, other processes, database access... it can be hard to do a proper test.

On the other hand, it is pretty obvious when viewing the fixed code that this patch will improve performance or, at least, will not make it worse. A stream of the file is done in two cases and we found that it is needed only in one of them, so we change the code to do the stream only in the case when it is needed.

IMHO a test to check that file upload is working fine after the patch would be enough, if Samigo is configured to store the files in the filesystem. Database storing is not affected by this patch.


Comment by Laura Gekeler [ 01-Aug-2017 ]

Thank you for clarifying. This is great!

Comment by Neal Caidin [ 01-Sep-2017 ]

I added a Test Plan. Is it accurate and complete enough?

Comment by Daniel Merino Echeverría [ 04-Sep-2017 ]

Yes, I think the test plan is fine.

Comment by Neal Caidin [ 15-Nov-2017 ]

Hmmm... now I don't remember what this means (in the Test plan) 

"Upload a file with a question."

Generated at Tue Feb 18 23:04:20 CST 2020 using Jira 8.0.3#800011-sha1:073e8b433c2c0e389c609c14a045ffa7abaca10d.