-
Notifications
You must be signed in to change notification settings - Fork 100
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
Unload chunks #488
Unload chunks #488
Conversation
what is the idea of the change ? if you want to decrease world memory, one solution could be a LRU, but this should be happening in pworld, not in flying-squid |
In pworld a LRU can be implemented (and I'll implement it someday), but that's optional. |
You can't actually remove the chunks if one player get too far as other players may still need them. So you need a strategy to decide when to remove chunks. |
It seems you implemented the first solution I'm mentioning. |
I implemented a counter for that. The only problem I see is when players in two dimensions are loading chunks at same position - server will keep both and unload only one.
Unlike java server,
That should be implemented in pworld, also see: PrismarineJS/prismarine-design#1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you either add a _ before all these new methods in serv and player
either document them all
the first option is probably best as it doesn't seem like these methods should be exposed
do you intend to finish this? a minor change is still missing |
Thanks, merged in @KaffinPX PR |
Yes,
flying-squid
keeps all chunks loaded until got Out-Of-Memory error