From 2c509e85429c70b528a73d7a57a3c080fb8b06bf Mon Sep 17 00:00:00 2001 From: Vika Date: Thu, 14 Jul 2022 05:46:42 +0300 Subject: media: buffer disk I/O and add debug logging It looks like buffering reads can double my performance. Nice. --- kittybox-rs/src/media/storage/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kittybox-rs/src/media/storage/mod.rs') diff --git a/kittybox-rs/src/media/storage/mod.rs b/kittybox-rs/src/media/storage/mod.rs index cb8b38f..5614437 100644 --- a/kittybox-rs/src/media/storage/mod.rs +++ b/kittybox-rs/src/media/storage/mod.rs @@ -4,6 +4,7 @@ use tokio_stream::Stream; use bytes::Bytes; use serde::{Deserialize, Serialize}; use std::pin::Pin; +use std::fmt::Debug; pub mod file; @@ -86,7 +87,7 @@ pub trait MediaStore: 'static + Send + Sync + Clone { content: T, ) -> Result where - T: tokio_stream::Stream> + Unpin + Send; + T: tokio_stream::Stream> + Unpin + Send + Debug; async fn read_streaming( &self, -- cgit 1.4.1