Repository navigation
fix(3ds): stop rewriting report.txt during play - #72
Merged
Merged
Conversation
On a slow SD card a background rewrite took up to 2.6 s and the game's ISO reads waited behind it: freezes every 5 s, 64-74 % speed, while a run on the same card with 78 ms writes had none (#66). The bottom screen still updates every 5 s, but report.txt is now written at the start, on exit and when the bottom screen is touched. An empty report_live.txt restores the write every 5 s for runs that end without an exit. Verified: CTest 32/32; devkitARM build; Azahar autotest of 1,500 vblanks writes the file only at the start and end (2 written), 6 times with report_live.txt. Not verified: the tap in a real run, a slow card on hardware.
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.
What changed
On a slow SD card the background
report.txtrewrite held up the game's ISO reads, which showed up as freezes every 5 s (#66). The file is no longer written periodically during play.report.txtis written at the start of the run, on exit, and when the bottom screen is touched. The touch goes through the existing writer thread, and the game never sees it.report : touch to save, N written. It replaces the blank row 5, so no other row moves.sdmc:/p3p3ds/report_live.txtrestores the write every 5 s, for runs that end without an exit (a crash, a killed emulator). The Azahar notes in then3ds-platformskill mention it.Evidence
sd max 2656 ms,io 36, 64-74 % speed; no freezes withsd max 78 ms,io 0, 96-99 % speed.Verification
p3p3ds.3dsxpasses.report.txtchanged only at the start and at the end (2 written);report_live.txt: every 5-6 s (6 written).Not verified
report_live.txt, andKEY_TOUCHinhidKeysDownwas checked in the libctru source only.Trade-off
A host crash now leaves only the start report (build,
status : running) unlessreport_live.txtis present.Closes #71
Refs #66