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

Non-statically saved objects are never deactivated #9821

Closed
gpcf opened this issue May 5, 2020 · 8 comments · Fixed by #10485
Closed

Non-statically saved objects are never deactivated #9821

gpcf opened this issue May 5, 2020 · 8 comments · Fixed by #10485
Labels
Bug Issues that were confirmed to be a bug @ Server / Client / Env.

Comments

@gpcf
Copy link

gpcf commented May 5, 2020

Minetest version
Minetest 5.2.0 (Linux)
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_GETTEXT=1
USE_SOUND=0
USE_CURL=1
USE_FREETYPE=1
USE_LUAJIT=1
STATIC_SHAREDIR="/usr/share/games/minetest"
Summary

Objects with static_save = false are never deactivated. See This forum thread for more info. This leads to an entity flood on the server and to severe lag due to the on_step of the entities being run. This is quite bad with advtrains, which makes extensive use of ephemerous entities, that persist in this way.

@gpcf gpcf added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label May 5, 2020
@rubenwardy rubenwardy added @ Server / Client / Env. Bug Issues that were confirmed to be a bug and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels May 6, 2020
@rubenwardy
Copy link
Member

Occasionally, there are times where you see code and you think: "whhhhyyyy".
This is one of those times

image

@sfan5
Copy link
Member

sfan5 commented May 6, 2020

It's actually quite useful for WorldEdit and signs_lib

  • WorldEdit area markers are persistent for the entire session even if you walk away n*1000 nodes
  • signs_lib creates the entities in an LBM so deleting them before block unload would be too early

So my question here is:
Does advtrains really want the entities to be deleted when the player walks (by default) 48 nodes away?

@Hume2
Copy link

Hume2 commented May 6, 2020

The train entities can be deleted any time, they restore shortly if they are still needed.

@gpcf
Copy link
Author

gpcf commented May 6, 2020

That was the whole point of the static_save property: to prevent short-lived technical entities from cluttering the whole server.

@BuckarooBanzay
Copy link
Contributor

BuckarooBanzay commented Sep 23, 2020

Whats the current consensus about this issue?
I ask because as of right now the signs_lib mod causes quite the amount of entities due to them not unloading (in the 10k ballpark figure depending on usage).
Which in turn also affects every minetest.get_objects_inside_radius call because of the linear search behavior.

@gpcf
Copy link
Author

gpcf commented Sep 23, 2020

Well, my current status is that the advtrains workaround greatly increased server performance, however, we still have issues with get_objects_inside_radius being a huge performance hog.

BuckarooBanzay referenced this issue in pandorabox-io/pandorabox_custom Sep 24, 2020
@gpcf
Copy link
Author

gpcf commented Oct 12, 2020

Turns out the workaround wasn't complete and the couples still don't get deleted. Essentially all the work shifted onto advtrains developers to reinvent the wheel to fix the issue that should have been fixed with static_save = false.

@sfan5
Copy link
Member

sfan5 commented Oct 12, 2020

I know this isn't a satisfactory situation but I don't think other developers (e.g. signs_lib) would like to have the need for a workaround forced on them to continue their previous usage of static_save = false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Server / Client / Env.
Projects
None yet
5 participants