Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Add options to disable display entities ticking

Open galacticwarrior9 opened this issue 1 year ago • 10 comments

Is your feature request related to a problem?

Display entities tick, but this is unnecessary unless you need them as passengers.

Describe the solution you'd like.

Separate options to disable ticking all four display entities (Display, TextDisplay, BlockDisplay and ItemDisplay) - and, if possible, interaction entities as well.

Describe alternatives you've considered.

I don't believe there are any.

Other

Someone proposed this on the Paper Discord last March, but I don't believe they followed through with making an issue.

Image Image 2

galacticwarrior9 avatar Feb 04 '24 18:02 galacticwarrior9

I can't really think of a scenario where you would have enough display entities for this to become relevant where you also don't require their passenger/vehicle ticking functionality

kennytv avatar Feb 05 '24 08:02 kennytv

Custom crops, furniture, etc are our current use-cases. The former in particular leads to thousands of DEs being loaded. Our use-case is such that we are not using the display entities as passengers, nor as having passengers.

galacticwarrior9 avatar Feb 05 '24 08:02 galacticwarrior9

do you happen to have a profiler report?

MiniDigger avatar Feb 06 '24 10:02 MiniDigger

In contrast to armor stands, which can be affected by collisions, gravity or flowing water, display entities do practically nothing in their tick method. Therefore, it really should not be necessary to prevent them from ticking.

Brokkonaut avatar Feb 14 '24 04:02 Brokkonaut

I had a 40k display entities in the world and tps drops to 10 just because they exist.
Disabling ticking is most needed feature

Darwin1546 avatar Mar 08 '24 05:03 Darwin1546

I had a 40k display entities in the world and tps drops to 10 just because they exist. Disabling ticking is most needed feature

Don't forget that entities have other lags than just ticking, for example they need always to calculate who can see them, and if they need to update their data to players

Even if paper fully disables display entities ticking, 40k will still have a big impact on the server

masmc05 avatar Mar 08 '24 07:03 masmc05

we need a proper profiler report.

MiniDigger avatar Mar 08 '24 09:03 MiniDigger

Spark report with 50k item displays

As already suspected by some, the main issue (nearly 60% of tick time) seems to be the canSee checks and sending the updates to players, not the actual tick logic of the item display itself. I am not against adding such an option, seems easy enough. But I don't think it will have the positive effects you are hoping for.

Malfrador avatar Mar 08 '24 11:03 Malfrador

Yeah, that too
Looks like minecraft wasn't ready for display entities
Is there is any fixes for canSee lags problem?

Darwin1546 avatar Mar 11 '24 17:03 Darwin1546

canSee is barely a real issue, I mixed that up a bit. The main performance loss comes just from tracking that many entities. You can improve that easily with a lower entity tracking range (spigot.yml). 50k entities at once also heavily slow the client down. I really wouldn't blame the game there though - it's just way way more than it was ever designed for.

Malfrador avatar Mar 11 '24 17:03 Malfrador