When running action=purge on File: pages of huge uploaded video files, such as https://commons.wikimedia.org/wiki/File:Tears_of_Steel_in_4k_-_Official_Blender_Foundation_release.webm (914MB source file) can be very slow; under good network & load conditions I timed that one running for around 40 seconds.
If I understand what's going on, a purge on a File: page causes the image metadata to be invalidated and then re-read from the source file... which means a full copy of 914 megabytes from swift to the local filesystem before the Handler can peek at what's probably only a few bits of the file.
Might want to think about whether this needs to be fully synchronous on the action=purge POST, or would be ok to run through a background job. Or, we could think about out how to provide access to just the data required (filesystem mapping? HTTP with range requests?)