summaryrefslogtreecommitdiff
path: root/internal/media/metadata.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-11-05 17:53:47 +0100
committerLibravatar tobi <tobi.smethurst@protonmail.com>2025-11-17 14:12:29 +0100
commitddf887d95c1cef95746f9881dc4180d983e7a351 (patch)
tree085dd1942c87ca1ff7da32dcdc5b3a9c0b6e5f28 /internal/media/metadata.go
parent[bugfix] more RSS validation issues (#4517) (diff)
downloadgotosocial-ddf887d95c1cef95746f9881dc4180d983e7a351.tar.xz
[performance] when transforming media, perform read operations of large files using mmap (#4541)
the performance gains aren't as substantial as i was hoping, but benchmarks did show it averaged out faster using this method. unfortunately i managed to lose the benchmarks i wrote with a poorly timed `git checkout -- .` 😭 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4541 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/media/metadata.go')
-rw-r--r--internal/media/metadata.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/media/metadata.go b/internal/media/metadata.go
index c1fa58645..6524784fd 100644
--- a/internal/media/metadata.go
+++ b/internal/media/metadata.go
@@ -75,7 +75,7 @@ func clearMetadata(ctx context.Context, filepath string) error {
// terminateExif cleans exif data from file at input path, into file
// at output path, using given file extension to determine cleaning type.
func terminateExif(outpath, inpath string, ext string) (err error) {
- var inFile *os.File
+ var inFile fileReader
var outFile *os.File
// Ensure handles