Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

fix: add performance logging to find_ffmpeg_location function

Tonho81b508353057
diff --git a/src-tauri/src/core/ytdlp.rs b/src-tauri/src/core/ytdlp.rs
index 163a43ea..c4ee9564 100644
--- a/src-tauri/src/core/ytdlp.rs
+++ b/src-tauri/src/core/ytdlp.rs
@@ -162,6 +162,7 @@ async fn check_ytdlp_freshness(path: &Path) {
}
async fn find_ffmpeg_location() -> Option<String> {
+ let _timer_start = std::time::Instant::now();
#[cfg(target_os = "windows")]
let output = crate::core::process::command("where")
.arg("ffmpeg.exe")
@@ -190,12 +191,14 @@ async fn find_ffmpeg_location() -> Option<String> {
.ok()?;
if !output.status.success() {
+ tracing::info!("[perf] find_ffmpeg_location took {:?}", _timer_start.elapsed());
return None;
}
let path_str = String::from_utf8_lossy(&output.stdout);
let first_line = path_str.lines().next()?.trim().to_string();
if first_line.is_empty() {
+ tracing::info!("[perf] find_ffmpeg_location took {:?}", _timer_start.elapsed());
return None;
}