The Wayback Machine - https://web.archive.org/web/20200819170604/https://github.com/SFTtech/openage/issues/1256
Skip to content
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

Reduce converter memory usage with on-demand read #1256

Open
heinezen opened this issue May 4, 2020 · 0 comments
Open

Reduce converter memory usage with on-demand read #1256

heinezen opened this issue May 4, 2020 · 0 comments

Comments

@heinezen
Copy link
Contributor

@heinezen heinezen commented May 4, 2020

The new converter (#1151) uses member objects to operate on data from the .dat files. While these provide the necessary functions for conversion, they are also significantly larger than the original dat file entries (20x - 400x the size). This results in a comparatively high memory usage, especially for DE2 which uses ~1.1 GB of memory for all dat file entries. Note that the converter does not create objects for all entries by default, but the size difference compared to the source is still significant.

A solution to this problem could be that we read certain structures into member objects on-demand during conversion, instead of all converting them during the initial read.

This would require:

  • A special ValueMember class that references an offset in the .dat file and a GenieStructure reference for the dataformat
  • Manual loading and unloading of the structure from file
  • Dynamic loading and unloading of the structure from file
  • Identifying places in the converter where manual loading makes sense
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.