Loading debian/changelog +8 −0 Original line number Diff line number Diff line mediadb (20260424+77) unstable; urgency=medium * Performance: reduce prefetch block size 256KB→64KB, look-ahead 2MB→256KB, probesize 1MB→256KB, analyze duration 2s→1s. ~8× less cluster I/O before first frame decode; significantly faster video preview and seek. -- Jan Koester <jan.koester@tuxist.de> Thu, 24 Apr 2026 00:00:00 +0200 mediadb (20260424+76) unstable; urgency=medium * Fix: remove render_pool_, run FFmpeg inline on HTTP worker threads. Loading src/preview.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ static std::string ff_err2str(int err) { * benefit from previously fetched data. */ struct PrefetchBuffer { static constexpr std::size_t BLOCK_SIZE = 256 * 1024; // 256 KB — larger reads amortise cluster round-trips static constexpr std::size_t AHEAD_BLOCKS = 8; // 8 blocks ahead = 2 MB look-ahead static constexpr std::size_t BLOCK_SIZE = 64 * 1024; // 64 KB — small blocks for fast initial decode static constexpr std::size_t AHEAD_BLOCKS = 4; // 4 blocks ahead = 256 KB look-ahead MediaBackendApi* db; ThreadPool* io_pool; // bounded I/O pool (separate from render pool) Loading Loading @@ -818,8 +818,8 @@ std::optional<PreviewResult> FFmpegPreviewer::render_streaming(MediaBackendApi& format_ctx->flags |= AVFMT_FLAG_CUSTOM_IO; // Limit probing *before* open so format detection reads less data // over cluster I/O. format_ctx->probesize = 1024 * 1024; format_ctx->max_analyze_duration = 2 * AV_TIME_BASE; format_ctx->probesize = 256 * 1024; format_ctx->max_analyze_duration = 1 * AV_TIME_BASE; int rc = avformat_open_input(&format_ctx, nullptr, nullptr, nullptr); if (rc < 0) { Loading Loading
debian/changelog +8 −0 Original line number Diff line number Diff line mediadb (20260424+77) unstable; urgency=medium * Performance: reduce prefetch block size 256KB→64KB, look-ahead 2MB→256KB, probesize 1MB→256KB, analyze duration 2s→1s. ~8× less cluster I/O before first frame decode; significantly faster video preview and seek. -- Jan Koester <jan.koester@tuxist.de> Thu, 24 Apr 2026 00:00:00 +0200 mediadb (20260424+76) unstable; urgency=medium * Fix: remove render_pool_, run FFmpeg inline on HTTP worker threads. Loading
src/preview.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ static std::string ff_err2str(int err) { * benefit from previously fetched data. */ struct PrefetchBuffer { static constexpr std::size_t BLOCK_SIZE = 256 * 1024; // 256 KB — larger reads amortise cluster round-trips static constexpr std::size_t AHEAD_BLOCKS = 8; // 8 blocks ahead = 2 MB look-ahead static constexpr std::size_t BLOCK_SIZE = 64 * 1024; // 64 KB — small blocks for fast initial decode static constexpr std::size_t AHEAD_BLOCKS = 4; // 4 blocks ahead = 256 KB look-ahead MediaBackendApi* db; ThreadPool* io_pool; // bounded I/O pool (separate from render pool) Loading Loading @@ -818,8 +818,8 @@ std::optional<PreviewResult> FFmpegPreviewer::render_streaming(MediaBackendApi& format_ctx->flags |= AVFMT_FLAG_CUSTOM_IO; // Limit probing *before* open so format detection reads less data // over cluster I/O. format_ctx->probesize = 1024 * 1024; format_ctx->max_analyze_duration = 2 * AV_TIME_BASE; format_ctx->probesize = 256 * 1024; format_ctx->max_analyze_duration = 1 * AV_TIME_BASE; int rc = avformat_open_input(&format_ctx, nullptr, nullptr, nullptr); if (rc < 0) { Loading