aboutsummaryrefslogtreecommitdiff
path: root/Cargo.toml
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-07-16 16:52:52 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-07-16 16:52:52 +0200
commitf5549b97bf85c0b169093a3a8478d610ef7c9e2e (patch)
tree274a1572f27b07360882dd629b93d422b3335fcb /Cargo.toml
parentd7b1a895de9e3b78dc4f303de6b5a692849b1cd1 (diff)
downloadtools.nes-f5549b97bf85.tar.gz
tools.nes-f5549b97bf85.zip
readrom: only read the ROM file once
Since the implementation grew from disassembling a single subroutine, reading the ROM file from inside print_range() made sense. But since we have disassembling of full segments and files now, this reading would be triggered multiple times. Commit d7b1a895de9e ("readrom: add an option to disassemble the full file") avoided the exhaustion of the input by using seek(), but that's just a hack and it's hiding the fact that we are constantly reading the same thing over and over. Constantly reading ROM files isn't that much of a performance issue given how small they are, but it's embarrasing anyways. Fix this by reading the full file once and passing the slice of bytes to the same functions that used to require the file to be passed. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'Cargo.toml')
0 files changed, 0 insertions, 0 deletions