Skip to content

AOTIR: Switch over to mmap-based loading #976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2021
Merged

Conversation

skmp
Copy link
Contributor

@skmp skmp commented Apr 19, 2021

Overview

This updates the file format and the in memory structures so we can mmap the IRData and RAData from the file, instead of having to read it. This also introduces a sorted array for binary searching the file, which can also be mmap'd.

This makes it possible to load AOTIR files very quickly, and in fairly constant time. It effectivelly can pull a few fragments from a huge (6GB+ tested) aotir file without taking 2 seconds to load.

@skmp skmp force-pushed the skmp/aotir-mmap branch 2 times, most recently from 4394091 to c4640c2 Compare April 19, 2021 20:02
@skmp skmp force-pushed the skmp/aotir-mmap branch 2 times, most recently from a352601 to 4391cf9 Compare April 28, 2021 10:00
@skmp skmp force-pushed the skmp/aotir-mmap branch from 4391cf9 to 32b4b02 Compare April 28, 2021 10:09
@skmp skmp marked this pull request as ready for review April 28, 2021 10:10
@Sonicadvance1 Sonicadvance1 merged commit a30866a into main May 1, 2021
@Sonicadvance1 Sonicadvance1 deleted the skmp/aotir-mmap branch May 1, 2021 01:24
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.

2 participants