Wait longer for a switch note another program holds before treating it as unreadable #196

Closed
opened 2026-10-26 21:24:03 -05:00 by ethan-hann · 1 comment
Owner

SwitchJournal.Read and Clear try 4 times with waits of 30, 60 and 90 ms, so a switch note held by another program (an antivirus scan, a backup tool) is given up on after about 180 ms. Read then reports a stopped switch with no known target, which refuses snapshots and offers only Discard; Clear reports the note as stuck. Nothing is lost, but a slow scanner on a mid-range PC can push a player into Discard for no reason. Measure how long common scanners hold a freshly written small file and size the waits (one constant in SwitchJournal covers both) so a normal scan is outlasted.

SwitchJournal.Read and Clear try 4 times with waits of 30, 60 and 90 ms, so a switch note held by another program (an antivirus scan, a backup tool) is given up on after about 180 ms. Read then reports a stopped switch with no known target, which refuses snapshots and offers only Discard; Clear reports the note as stuck. Nothing is lost, but a slow scanner on a mid-range PC can push a player into Discard for no reason. Measure how long common scanners hold a freshly written small file and size the waits (one constant in SwitchJournal covers both) so a normal scan is outlasted.
ethan-hann added this to the Later milestone 2026-10-26 21:24:03 -05:00
Author
Owner

Shipped in 0.9.17 (PR 227).

Shipped in [0.9.17](https://git.tortal.tech/ethan-hann/SavePoint/releases/tag/v0.9.17) (PR 227).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#196
No description provided.