perf(MediaSessionManager): 减少时间线更新的节流间隔#840
Conversation
在 MPRIS 上,播放进度有时会有一些奇怪的延迟(最多慢 1~2s) 我尝试降低节流间隔,发现此问题有明显缓解(在我的电脑上测试 3 天,延迟被降低至 1s 以内) 此更改不应影响其他行为,包括其他操作系统的行为,也不应造成性能问题
Summary of ChangesHello @MoYingJi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在提高媒体会话时间线更新的响应速度,特别是解决在 MPRIS 上观察到的播放进度延迟问题。通过显著缩短时间线更新的节流间隔,预计此更改将缓解这些延迟,而不会对性能或在其他操作系统上的行为产生负面影响。 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| private throttledSendTimeline = throttle((currentTime: number, duration: number) => { | ||
| sendMediaTimeline(currentTime, duration); | ||
| }, 1000); | ||
| }, 200); |
在 MPRIS 上,播放进度有时会有一些奇怪的延迟(最多慢 1~2s)
我尝试降低节流间隔,发现此问题有明显缓解(在我的电脑上测试 3 天,延迟被降低至 1s 以内)
此更改不应影响其他行为,包括其他操作系统的行为,也不应造成性能问题