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

Avoid marking map blocks dirty upon deserialization. #10670

Merged
merged 1 commit into from Nov 26, 2020

Conversation

lhofhansl
Copy link
Contributor

Improves #10566 (but does not fix it completely)
@hecktest

As is just de-serializing a block from disk marks it dirty, which makes no sense.
That looks like an unintended side-effect of setting the blocks timestamp.

Note that active blocks are still marked dirty every 60s, but is a subset of all blocks.

@lhofhansl lhofhansl requested a review from sfan5 November 26, 2020 01:19
@hecktest
Copy link
Contributor

Does this also reduce the lag from map saves?

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Through extensive thinking I have concluded that this is a good idea.

@lhofhansl
Copy link
Contributor Author

@sfan5 :)

@hecktest Unfortunately not. Mapsave cause lag because (1) it always saves the whole block even just one attribute changed, (2) compression is slow'ish, and perhaps most importantly (3) it's done while holding the global environment lock (so no emerges, no blocks send or received to the client, no active blocks or objects, etc, etc can happen at the same time)

@lhofhansl lhofhansl merged commit f1349be into minetest:master Nov 26, 2020
BuckarooBanzay added a commit to pandorabox-io/pandorabox.io that referenced this pull request Nov 28, 2020
Includes lot of changes in regards to map loading, sending and saving
Engine commit: minetest/minetest@f1d72d2

Important changes:
* minetest/minetest#10670
* minetest/minetest#10637
* minetest/minetest#10616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants