Skip to content

perf(scan): parallel store syncs, local rescans that don't wait, per-store rescans - #27

Merged
TheBiemGamer merged 2 commits into
mainfrom
perf/scan-speed
Nov 11, 2026
Merged

TheBiemGamer merged 2 commits into
mainfrom
perf/scan-speed

Conversation

@TheBiemGamer

Copy link
Copy Markdown
Owner

Handoff items 1, 2 and 3 (scan speed).

  • Parallel online sync (1): scan_online runs Epic, GOG and Amazon in std::thread::scope, one thread per store. Results and failure handling are unchanged.
  • Local rescans no longer wait for online ones (3): ScanTurns runs 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.
  • Only the store involved (2): cherry-picks bf6d561 from perf/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: ScanTurns covering 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 ..

…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)
@TheBiemGamer
TheBiemGamer merged commit 6778ee2 into main Nov 11, 2026
3 checks passed
@TheBiemGamer
TheBiemGamer deleted the perf/scan-speed branch November 11, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant