Repository navigation
perf(scan): parallel store syncs, local rescans that don't wait, per-store rescans - #27
Merged
Merged
Conversation
…scan skip the online wait
…ore involved after a login After an Epic, GOG or Amazon job, read installed state from local files over the cached owned games instead of running a full online scan: Legendary's installed.json, gog_installs, and Nile's library.json and installed.json. The finished job's progress and toast still wait for that scan, which now takes about 50 ms instead of 8-10 s. Read Legendary's installed.json directly instead of running list-installed, which saves a Legendary start (about 1.3 s) on every online scan. An Amazon job now drops only that game from the cached update answer and marks it due, so other games keep their update marks. A login, logout or store tool install fetches only that store online; the other stores' installs are read locally. An online scan saves as a local scan over what it fetched, so its installs are never older than a rescan that ran during the fetch. (cherry picked from commit bf6d561)
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.
Handoff items 1, 2 and 3 (scan speed).
scan_onlineruns Epic, GOG and Amazon instd::thread::scope, one thread per store. Results and failure handling are unchanged.ScanTurnsruns the slow online fetch outside the scan turn, one fetch at a time. A Steam-only rescan (custom-game save, the 60 s Steam check) runs during it. When the fetch is done, the online scan takes its turn and saves as a local scan over what it fetched, so the installs it writes are read at save time and can't undo a newer rescan.bf6d561fromperf/local-rescan. Store jobs (install, uninstall, Move, DLC uninstall, imports) rescan installs from local files. Logins, logouts and store tool installs now fetch only that store online (rescan_store); the other stores' installs are read locally. The refresh button still syncs every store.Tests:
ScanTurnscovering rules for Steam, local, online and one-store scans, and a local rescan that finishes while an online fetch is still running.Checks:
cargo test(355 passed),cargo clippy --all-targets -- -D warnings,cargo fmt --check,npm run check,npm test,npx prettier --check ..