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

[FR] Show folder and safe game size in web overview #59

Open
Kariton opened this issue Dec 1, 2024 · 3 comments
Open

[FR] Show folder and safe game size in web overview #59

Kariton opened this issue Dec 1, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Kariton
Copy link

Kariton commented Dec 1, 2024

Would be nice if the startpage would list the save game size
as well as the total size of the generated script-output/mapshot/save/d-* directory
next to the Played info.

@Palats
Copy link
Owner

Palats commented Dec 5, 2024

The size of the game file would be relatively straightforward to get when rendering from the CLI (impossible when rendering using /mapshot in game, but it is fine to have different behavior there I think). The information would have to be obtained in the CLI (it copies the save file anyway) and have the mod add it in mapshot.json. From there the UI can easily display it.

The size of the generated content is a bit trickier (well, mildly). The game does not have access to it at all, so it would be up to the mapshot binary to do it. From there, there are 2 options:

  1. Have the render command do it. It would need to do it after triggering the rendering, and update the mapshot.json content. Right now, the CLI never modifies the content of mapshot.json, so we would need to change the behavior. But that's not outlandish either, it is basic json edition.
  2. Do it on the fly when opening the UI. It would mean that the serving path would have to scan the whole tree on startup. That would generate a lot more disk access than I want on startup. Scanning files always has some risk (symlink to weird places and the like), so that would make starting the server at risk each time.

Oh well, I guess that means there is just one option, and that is option 1 :)

[I have no plan for now to work on that]

@Palats Palats added the enhancement New feature or request label Dec 5, 2024
@Kariton
Copy link
Author

Kariton commented Dec 6, 2024

Thanks for considering and giving feedback.

option two would be absolutely insane considering how big some mapshots can get. :P

mine is currently at ~150GB (8h-10h rendertime with our 80MB save on my kubernetes cluster; space exploration, all surfaces, jpgquality 95 with tilemin 16)
just making some tests. will see how lower jpgquality affects the quality and disk usage.

@Palats
Copy link
Owner

Palats commented Dec 7, 2024

The mapshots are big, but the scan time is largely dependent on the number of files, not the size; though there are also a lot of files :) But yeah, in any case, not a good approach.

Thanks for the number btw, I don't have a good picture of what people do there. I was not expecting that long of rendering time I must admit. For the disk usage, the biggest contribution is the render zoom level - switching to tilemin 32 would probably about half the disk size and render time I imagine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants