-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance regression with new osd-overlay API on unchanged input #7615
Comments
Changing the tick from 0.01 to 1 or seems to normalize GPU usage, as does checking whether the text to be displayed has changed (as indicated in the script's comment). The reason is most definitely a removed I will submit a PR for this that re-adds the checks shortly after. |
Actually, I will not submit a PR because the code has changed since that commit and I'm unsure what the intention behind the removal of the before and after comparisons was and whether it should be the script's responsibility to only update when necessary. I'd like a maintainer to review this issue first and determine the next steps. |
Wasn't this mentioned somewhere as intentional? It avoids having to check all the parameters etc. for changes in the code. |
I don't see any mention of it in the commit message, documentation, or in the current code. It was likely an intentional change, as I find it hard to imagine to stumple upon these checks and just forget about them when rewriting. It was an undocumented API, but it is a change in behavior regardless. I believe there are two ways forward for this issue:
Both are valid options, imo. In an ideal world, 1 is the obvious choice, as it involves the least computational overhead. However, the observed impact from improper usage when the osd is refreshed frequently without any changes was unexpectedly high for a 10ms timeout. It may be worth to do this double-duty internal comparison regardless if it is relatively cheap enough. I submitted a PR to fix the API usage for syncplay but not for the progressbar script (because that uses moonscript and I switched to a different bar for now), as those were the two offending scripts I used. I have no idea whether other scripts also relied on the old internal check. |
As an update, both scripts I used that were running into this have been updated and check for redundant update calls on their side now. |
Closing this one since it is old, the change was intentional, and it seems all relevant scripts have updated long ago to take into account the new behavior. |
Important Information
I initially reported and investigated this issue in torque/mpv-progressbar#56, but am moving it here now because I'm not sure whether this change was intentional. You can also find the script I used for bisecting there.
Reproduction steps
Create the following script:
Set the following config:
The config is used to emphasize the problem.
Expected behavior
GPU usage (observed through
radeontop
) is ~0-2% when paused.Actual behavior
GPU usage is around 60-100% when paused.
Log file
Nothing of interest, but here it is anyway: output.log
Sample files
Should be reproducable with any file. My test files were 1080p 10-bit h264 in mkv.
The text was updated successfully, but these errors were encountered: