Skip to content

Reduce time taken to update form with entity list and many media files #6843

@seadowg

Description

@seadowg

Currently, updating a form that has an entity list with many media files takes a long time - our benchmark (EntitiesBenchmarkTest#oneThousandMediaFilesWithEntityList) takes ~15s in a situation where no media files have changes and the entity list is the same. We should get this down to 5 seconds in line with EntitiesBenchmark#oneHundredThousandEntities.

Notes

Experimental changes reversed in #6841 were able to hit the 5 second target here in the entity list/many media file case. The main culprit was another optimization that copies media files from previous versions when performing a form update: this caused every media file to be copied to the download "sandbox" directory from the current version and then back again. This could be avoided if the code was smarter about the fact we're in a "media file update only" scenario. One way to achieve this would be to replace the booleans in ServerFormDetails with an enum (or ADT) to make the download "scenario" we're in explicit: either "new", "new version" or "new media".

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

in progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions