Optimize WEB source auto-selection with concurrent probing after sour…#2960
Draft
black4der wants to merge 2 commits intoopen-ani:mainfrom
Draft
Optimize WEB source auto-selection with concurrent probing after sour…#2960black4der wants to merge 2 commits intoopen-ani:mainfrom
black4der wants to merge 2 commits intoopen-ani:mainfrom
Conversation
Member
|
感谢贡献。 |
Member
|
Since this PR is inactive, I will set the state to Draft. |
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.
背景 / 动机
在日常使用 Animeko 的过程中,我发现一个比较明显的体验问题:在线播放源的加载、筛选和切换速度有时会比较慢。尤其是在某个源加载失败之后,系统往往还会等待较长时间,才继续切换到下一个源重新缓冲和加载。实际使用中,这种等待有时会持续十几秒,甚至接近 20 秒,对播放体验影响比较明显。
基于这个问题,我尝试自己做了一些优化。因为我并不是长期维护这个模块的开发者,所以不确定所有实现细节是否都是最优解,但就我目前的本地测试结果来看,整体播放前的等待时间明显缩短了,而且没有再频繁遇到“长时间卡住后才失败切源”的情况。如果实现思路或代码风格和项目现有方案有不一致的地方,也欢迎指出,我可以继续配合修改。
改动内容
这次改动主要针对 WEB 源的自动选择逻辑,核心目标是减少用户在播放前等待“慢源 / 失效源”的时间。
主要变化
保留现有“优先使用上一次播放源”的思路
不再过早开始测速
将原先偏串行的 WEB 探测改为并发探测
测速标准
探测超时
新增并发探测设置
实现说明
这次改动只作用于 WEB 源快选逻辑,不会改变“在线优先 / 下载优先 / 混合模式”这些原有播放模式本身的策略。
整体逻辑可以概括为:
测试情况
自动化测试
已补充并通过相关定向测试,包括:
手动测试
我在本地做了以下验证:
可能需要关注的点
结论
这次 PR 的目标比较直接:减少用户在 WEB 播放前等待慢源、坏源的时间,并尽量更快地拿到“真正能播而且实际速度更好”的源。
就我目前的本地使用和测试结果来看,这个方向是有效的,也明显改善了我自己在实际使用中的体验。