chore(backend): update to v176ca82 with HLS window preloading support#207
Merged
chore(backend): update to v176ca82 with HLS window preloading support#207
Conversation
This update brings the following enhancements to the backend: ## New Features ### HLS Window Preloading with Configurable Strategy - **Automatic Background Preloading**: Automatically preload previous N windows in the background when accessing HLS files - **Configurable Preload Count**: Add `preload_previous_windows` configuration option (default: 1, min: 0) - **Non-blocking Execution**: Preload tasks run in background without blocking user requests - **Smart Cache Detection**: Skip already-cached windows to optimize resource usage - **Priority Management**: Low priority (3) for preload tasks to avoid impacting active user requests - **Performance Metrics**: Returns (queued_count, cached_count) metrics for monitoring ## Technical Changes ### API Layer (`src/app/api/`) - **deps.py**: Add PreloadStrategy dependency injection provider (`get_preload_strategy`) - **v1/jit.py**: Auto-trigger preload on window access with `asyncio.create_task` ### Configuration (`src/app/config/`) - **manager.py**: Add `preload_previous_windows` setting (default: 1, min: 0) - **schemas.py**: Add `preload_previous_windows` field to TranscodeConfig ### Service Layer (`src/app/services/`) - **preload_strategy.py**: Implement `preload_previous_windows` method with: - Cache key validation to avoid redundant transcoding - Window ID calculation for previous windows - Low-priority task queuing - Comprehensive error handling and logging ## Benefits - **Improved User Experience**: Proactively loads likely-needed segments for smoother playback - **Performance Optimization**: Maintains performance for active requests through priority management - **Resource Efficiency**: Smart cache detection prevents unnecessary transcoding - **Flexibility**: Configurable preload count allows tuning based on use case (0 to disable) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Walkthrough将后端子模块指针从 d747012bbd0a394f644939e9c15212ea769274ab 更新为 176ca823ac2e6365f0721e43725c633b2d5aa9da;未发现其他变更,未修改导出/公共声明与控制流。 Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mkdir700
added a commit
that referenced
this pull request
Oct 12, 2025
…#207) This update brings the following enhancements to the backend: ## New Features ### HLS Window Preloading with Configurable Strategy - **Automatic Background Preloading**: Automatically preload previous N windows in the background when accessing HLS files - **Configurable Preload Count**: Add `preload_previous_windows` configuration option (default: 1, min: 0) - **Non-blocking Execution**: Preload tasks run in background without blocking user requests - **Smart Cache Detection**: Skip already-cached windows to optimize resource usage - **Priority Management**: Low priority (3) for preload tasks to avoid impacting active user requests - **Performance Metrics**: Returns (queued_count, cached_count) metrics for monitoring ## Technical Changes ### API Layer (`src/app/api/`) - **deps.py**: Add PreloadStrategy dependency injection provider (`get_preload_strategy`) - **v1/jit.py**: Auto-trigger preload on window access with `asyncio.create_task` ### Configuration (`src/app/config/`) - **manager.py**: Add `preload_previous_windows` setting (default: 1, min: 0) - **schemas.py**: Add `preload_previous_windows` field to TranscodeConfig ### Service Layer (`src/app/services/`) - **preload_strategy.py**: Implement `preload_previous_windows` method with: - Cache key validation to avoid redundant transcoding - Window ID calculation for previous windows - Low-priority task queuing - Comprehensive error handling and logging ## Benefits - **Improved User Experience**: Proactively loads likely-needed segments for smoother playback - **Performance Optimization**: Maintains performance for active requests through priority management - **Resource Efficiency**: Smart cache detection prevents unnecessary transcoding - **Flexibility**: Configurable preload count allows tuning based on use case (0 to disable) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
mkdir700
added a commit
that referenced
this pull request
Oct 12, 2025
…#207) This update brings the following enhancements to the backend: ## New Features ### HLS Window Preloading with Configurable Strategy - **Automatic Background Preloading**: Automatically preload previous N windows in the background when accessing HLS files - **Configurable Preload Count**: Add `preload_previous_windows` configuration option (default: 1, min: 0) - **Non-blocking Execution**: Preload tasks run in background without blocking user requests - **Smart Cache Detection**: Skip already-cached windows to optimize resource usage - **Priority Management**: Low priority (3) for preload tasks to avoid impacting active user requests - **Performance Metrics**: Returns (queued_count, cached_count) metrics for monitoring ## Technical Changes ### API Layer (`src/app/api/`) - **deps.py**: Add PreloadStrategy dependency injection provider (`get_preload_strategy`) - **v1/jit.py**: Auto-trigger preload on window access with `asyncio.create_task` ### Configuration (`src/app/config/`) - **manager.py**: Add `preload_previous_windows` setting (default: 1, min: 0) - **schemas.py**: Add `preload_previous_windows` field to TranscodeConfig ### Service Layer (`src/app/services/`) - **preload_strategy.py**: Implement `preload_previous_windows` method with: - Cache key validation to avoid redundant transcoding - Window ID calculation for previous windows - Low-priority task queuing - Comprehensive error handling and logging ## Benefits - **Improved User Experience**: Proactively loads likely-needed segments for smoother playback - **Performance Optimization**: Maintains performance for active requests through priority management - **Resource Efficiency**: Smart cache detection prevents unnecessary transcoding - **Flexibility**: Configurable preload count allows tuning based on use case (0 to disable) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
mkdir700
added a commit
that referenced
this pull request
Oct 15, 2025
…#207) This update brings the following enhancements to the backend: ## New Features ### HLS Window Preloading with Configurable Strategy - **Automatic Background Preloading**: Automatically preload previous N windows in the background when accessing HLS files - **Configurable Preload Count**: Add `preload_previous_windows` configuration option (default: 1, min: 0) - **Non-blocking Execution**: Preload tasks run in background without blocking user requests - **Smart Cache Detection**: Skip already-cached windows to optimize resource usage - **Priority Management**: Low priority (3) for preload tasks to avoid impacting active user requests - **Performance Metrics**: Returns (queued_count, cached_count) metrics for monitoring ## Technical Changes ### API Layer (`src/app/api/`) - **deps.py**: Add PreloadStrategy dependency injection provider (`get_preload_strategy`) - **v1/jit.py**: Auto-trigger preload on window access with `asyncio.create_task` ### Configuration (`src/app/config/`) - **manager.py**: Add `preload_previous_windows` setting (default: 1, min: 0) - **schemas.py**: Add `preload_previous_windows` field to TranscodeConfig ### Service Layer (`src/app/services/`) - **preload_strategy.py**: Implement `preload_previous_windows` method with: - Cache key validation to avoid redundant transcoding - Window ID calculation for previous windows - Low-priority task queuing - Comprehensive error handling and logging ## Benefits - **Improved User Experience**: Proactively loads likely-needed segments for smoother playback - **Performance Optimization**: Maintains performance for active requests through priority management - **Resource Efficiency**: Smart cache detection prevents unnecessary transcoding - **Flexibility**: Configurable preload count allows tuning based on use case (0 to disable) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update backend submodule to v176ca82, introducing HLS window preloading functionality for improved video playback experience.
New Features
🚀 HLS Window Preloading with Configurable Strategy
preload_previous_windowsconfiguration option (default: 1, min: 0)asyncio.create_taskwithout blocking user requestsTechnical Changes
API Layer (
src/app/api/)get_preload_strategydependency injection providerasyncio.create_taskfor non-blocking executionConfiguration (
src/app/config/)preload_previous_windowssetting (default: 1, min: 0 to disable)preload_previous_windowsfield toTranscodeConfigschemaService Layer (
src/app/services/)preload_previous_windowsmethod with:Benefits
Testing
Related Commits
🤖 Generated with Claude Code
Summary by CodeRabbit