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

[Question] Cache data GC? #70

Closed
juan-90s opened this issue Apr 3, 2024 · 3 comments
Closed

[Question] Cache data GC? #70

juan-90s opened this issue Apr 3, 2024 · 3 comments

Comments

@juan-90s
Copy link

juan-90s commented Apr 3, 2024

I noticed that every image shooted store as a .dat file in the directory world/data/exposure. Is there any mechanism in game to clean those unused and dropped image which can not be reached by players. I worry that the world directory size goes larger and larger.

@mortuusars
Copy link
Owner

mortuusars commented Apr 4, 2024

There isn't at the moment. It's a tricky thing to do.
I have planned to add a command to clear unused exposures (exposures are flagged when printed), but rejected it due to fears that some antiviruses can flag the mod as a virus because it deletes many files. Only recently some users reported that Windows Defender was false-flagging some mods as a threat (including exposure) and it was fixed by updating Defender. So I don't want to risk it.

Besides that - there's other issues with it: what if the player just prepared several film rolls but have not yet printed images from it? They would get deleted - as they weren't printed. It's not possible to be certain that specific exposure is not in use anywhere. I can't scan whole world and each end every item.

And another thing: you would need 20k+ exposures to reach 1GB (with default frame size).

@mortuusars
Copy link
Owner

I've made an addon that can help manage stored exposures:
https://www.curseforge.com/minecraft/mc-mods/exposure-catalog
https://modrinth.com/mod/exposure-catalog

Even though it's does not really do what you asked for, but it's probably the closest thing to it that I can do.
With Catalog you can easily delete exposures that were not printed, if that's acceptable solution in your case.

@juan-90s
Copy link
Author

juan-90s commented Jun 4, 2024

Thank you. It does help a lot. It’s a simple and efficient approach. Other method like broad searching the whole world or auto references count might be difficult to implement and maintain.

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

No branches or pull requests

2 participants