From 12c0101a232928e8969f23235ca45506e743d547 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Fri, 30 Jun 2017 23:30:57 +0200 Subject: contentenc: add PReqPool and use it in DecryptBlocks This gets us a massive speed boost in streaming reads. --- internal/fusefrontend/file.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'internal/fusefrontend') diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 70c8d83..a1f4f15 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -214,7 +214,10 @@ func (f *file) doRead(dst []byte, off uint64, length uint64) ([]byte, fuse.Statu } // else: out stays empty, file was smaller than the requested offset - return append(dst, out...), fuse.OK + out = append(dst, out...) + f.fs.contentEnc.PReqPool.Put(plaintext) + + return out, fuse.OK } // Read - FUSE call -- cgit v1.2.3