Repository navigation
feat(steam): pause downloads while the buttons are in use - #29
Merged
Merged
Conversation
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.
While Steam downloads, Big Picture moved at 0.3-2 frames/s on the RG40XX-H (quiet idle is 6.8-7.2): the download's decompression, writes and memory leave the UI paged out. Limiting the download didn't fix it: 1 MB/s gave 4.2-5.5 frames/s, 0.5 MB/s 3.4-5.2, and limiting only on input 1.0-2.3. Pausing did.
mdeck ui-fixesnow pauses downloads at the first button press during a download, and continues them 30 s after the last press. It uses Steam's own pause (EnableAllDownloads). On the device, with a 6.7 GB download running: 7.7 frames/s in the first 30 s, then 12.0, and the download continued 38 s after the last press.It leaves these alone:
A pause left behind by a Steam restart is undone at the next start.
DOWNLOAD_PAUSE_ON_INPUT=0in/etc/steam-session.confturns it off.Three fixes found on the way:
tests/test_download_pause_js.pyruns the script in Node against a fake Steam that reports late.ui-fixesnever reached the shared context before. Its new-document scripts needPage.enableto land after a context reload, and one script that threw kept the next from running. Each script is now registered on its own.Tests on Linux:
test_download_pause_js,test_ui_fixes_source,test_login_retry,test_ui_resume(17, all pass).