mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
perf(photo): stop re-reading the downloaded temp file
download_to_temp buffered the full bytes, wrote them to a temp file, and prepare_photo then read the whole file back from disk. The bytes are already in memory — pass them through (download_to_temp now returns (file, bytes)) so photo processing never touches the disk for input. Adds the bytes dependency to xmedia-bot (already in the lock via x-media).
This commit is contained in:
@@ -17,6 +17,7 @@ rusqlite = { version = "0.32", features = ["bundled"] }
|
||||
rand = "0.8"
|
||||
tempfile = "3"
|
||||
parking_lot = "0.12"
|
||||
bytes = "1"
|
||||
png = "0.18"
|
||||
zune-jpeg = "0.5"
|
||||
fast_image_resize = "6"
|
||||
|
||||
Reference in New Issue
Block a user