Significant slowdown in page loads when working with large numbers of files in groups

Bug #1465281 reported by Mike Kelly on 2015-06-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When working in groups where many files have been uploaded to the group space (hundreds or more), any part of the interface which uses the file browser slows significantly. For example when viewing the Files tab in the group, or when adding an Image content block to a group page.

There are two aspects to this - the retrieval of the page from the server, and the rendering of the page in the browser. Both become significantly slower as more files are uploaded.

Browser end
In the Files tab in a group with about 250 files, the Mochiscript javascript starts throwing errors due to long processing time, when rendering the page in the browser. (Firefox 38). This appears to be due to the code which initializes drag and drop on files and folders. (If all files are put into folders, the rendering of the Files tab page is almost instantaneous - once the page is retrieved from the server.)

Server end
The retrieval of pages from the server becomes very slow, apparently due to checking for files and permissions across many database tables, many times.

In a very large group with GB of user content the group became unusable, with uploads taking 20 seconds or more.

The filebrowser seems to load all available files every time. Could we load only the files in the current folder, and load other files when required?
Could we optimize the database query which returns the list of available files?

This issue is likely to occur in the users' personal upload space as well - I haven't tested that as yet.

Mike Kelly (m-f-kelly) on 2015-06-15
description: updated
Mike Kelly (m-f-kelly) wrote :

Correction - only the current folder is loaded in the file browser at any given time. The problem occurs when the current folder has many files.

Changed in mahara:
status: New → Triaged
importance: Undecided → Medium
Aaron Wells (u-aaronw) wrote :

Hi Mike,

Did this only start happening after you upgraded to Mahara 15.04?


Mike Kelly (m-f-kelly) wrote :

Hi Aaron,
No, we're still on 1.9.
I'm also pretty sure none of our customisations are touching any code relevant to this.
This has turned into quite a big issue at our institution so if you do get a chance to look at it that would be great.
Best wishes,

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers