This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
Optimization : If the content is already scanned, don't create a temporary file #52
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
When the content scanner have a lot of pressure, the creation of tempories files for all download request generate lot of IO and can saturate the server.
Describe the solution you'd like
When the content has already been scanned, we can skip the creation of a tempory file and return the result from the media repository request (the content scanner will act like a http reverse proxy).
Describe alternatives you've considered
An another solution we have considered is to use an in memory disk (but we are limited by the size of the memory).
Additional context
I think this change should append here :
https://github.com/matrix-org/matrix-content-scanner/blob/v1.6.3/src/handlers.js#L128
In case
if (cachedReport.scanned && cachedReport.clean)
we don't use tempory file.The text was updated successfully, but these errors were encountered: