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

Huge linkgraph savegame section #6041

Closed
DorpsGek opened this issue Jun 11, 2014 · 2 comments
Closed

Huge linkgraph savegame section #6041

DorpsGek opened this issue Jun 11, 2014 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Rubidium opened the ticket and wrote:

The savegame of https://www.tt-forums.net/viewtopic.php?f=31&t=70715 has a linkgraph section of about 275 MiB. This is more than the allowed 256 MiB, and shows some weakness of the linkgraph with respect to memory usage, especially in the savegame.

We need to figure out whether the savegame size can be reduced significantly in this case.

To load the savegame, use the attached diff.

Attachments

Reported version: 1.4.1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6041
@DorpsGek
Copy link
Member Author

fonsinchen wrote:

r26646 reduces the size of the saveload chunk but is not straightforward to backport to 1.4 as it also bumps the saveload version.
r26650 allows larger saveload chunks, of up to 4GiB

Some patches to backport r26646, reactivating the minor saveload version have been proposed. However, as r26650 can easily be backported I think that's unnecessary. With such large link graphs you already need a lot of RAM to keep the in-memory representation of the link graph around and the RAM requirements are still moderate compared to the CPU requirements of actually running such a game. On my computer the given savegame runs unplayably slow, but uses only about 500MiB to 1GiB of the 4GiB of RAM available. The save games are somewhat larger without r26646 but as the example shows they can be compressed very efficiently.

We could use a sparse vector or matrix implementation to optimize the in-memory representation of link graphs for size, but as most of the time link graphs are much smaller than the example given here I don't think it's worth it.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6041#comment13384

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed


This comment was imported from FlySpray: https://bugs.openttd.org/task/6041

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant