mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-03-14 18:55:37 +00:00
pre-allocate some amount of media read buffer
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
afdf5a07b5
commit
c6ae6adc80
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ impl Service {
|
|||
if let Ok(Metadata { content_disposition, content_type, key }) =
|
||||
self.db.search_file_metadata(mxc, &Dim::default()).await
|
||||
{
|
||||
let mut content = Vec::new();
|
||||
let mut content = Vec::with_capacity(8192);
|
||||
let path = self.get_media_file(&key);
|
||||
BufReader::new(fs::File::open(path).await?)
|
||||
.read_to_end(&mut content)
|
||||
|
|
Loading…
Add table
Reference in a new issue