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

island recalc create lag spike #1734

Closed
WarnDa opened this issue May 27, 2023 · 15 comments
Closed

island recalc create lag spike #1734

WarnDa opened this issue May 27, 2023 · 15 comments
Assignees
Labels
✔️ Confirmed Confirmed bugs that can be replicated 🔧 Potential fix A potential fix was already submitted

Comments

@WarnDa
Copy link

WarnDa commented May 27, 2023

Minecraft's Version

b22

Plugin's Version

1.19.3 pufferfish+

Describe the bug

When a user with a big island recalc his island that hasn't been recalculated since 2-3 days, it creates a massive lag spike (3500ms) and tps drop to ~10tps
Sometimes it creates a freeze during 3-4s
image
https://spark.lucko.me/0BUjzohmED

It wouldn't be possible to slow down the process or add a limit to the lag it can create ?

To Reproduce

Get a big island (here it's 200x200 islands with tonsss of farms)

Additional Information

No response

@WarnDa WarnDa added the Pending Pending reports to be investigated label May 27, 2023
@OmerBenGera OmerBenGera added ✔️ Confirmed Confirmed bugs that can be replicated and removed Pending Pending reports to be investigated labels Jun 3, 2023
@OmerBenGera
Copy link
Member

Check out latest dev build, let me know if it is better.
If it still not good, send me another spark profiler with the new version.

@OmerBenGera OmerBenGera added the 🔧 Potential fix A potential fix was already submitted label Jun 3, 2023
@WarnDa
Copy link
Author

WarnDa commented Jun 3, 2023

Check out latest dev build, let me know if it is better. If it still not good, send me another spark profiler with the new version.

Thanks !! Plugin takes 34% but do not create massive lag spike, so it's well better
image

image

https://spark.lucko.me/sG1pMYRvdO

@WarnDa
Copy link
Author

WarnDa commented Jun 24, 2023

Some recalc of big islands can still take some seconds and do a "minor" spike of 125ms ( I forgot to take a spark)
image

@OmerBenGera
Copy link
Member

Some recalc of big islands can still take some seconds and do a "minor" spike of 125ms ( I forgot to take a spark) image

Mind taking a spark and send it here as well?

@WarnDa
Copy link
Author

WarnDa commented Jun 24, 2023

Mind taking a spark and send it here as well?

Already sent one above (after your update)
https://spark.lucko.me/sG1pMYRvdO

OmerBenGera added a commit that referenced this issue Jun 30, 2023
@OmerBenGera
Copy link
Member

Check out latest dev build, let me know if it is better.

@WarnDa
Copy link
Author

WarnDa commented Jul 14, 2023

Check out latest dev build, let me know if it is better.

It's nearly the same
https://spark.lucko.me/XLt6qjZ6BH
image

@OmerBenGera OmerBenGera removed the 🔧 Potential fix A potential fix was already submitted label Jul 14, 2023
@OmerBenGera
Copy link
Member

Try latest dev build

@OmerBenGera OmerBenGera added the 🔧 Potential fix A potential fix was already submitted label Jul 14, 2023
@WarnDa
Copy link
Author

WarnDa commented Jul 16, 2023

Try latest dev build

Well better, the first recalc can be heavy, but the one after it's fine, here I did a /is admin recalc * with 120 players online :
https://spark.lucko.me/TNYkrkLd3z
image
image

@OmerBenGera
Copy link
Member

/is admin recalc * will obviously create lag, as it's gonna go through tons of blocks and recount them.
If you run /is admin recalc on a specific island, does it still cause lag?

@WarnDa
Copy link
Author

WarnDa commented Jul 20, 2023

/is admin recalc on a specific island

https://spark.lucko.me/3l9bTxkAvR
image
Just a peak at 200ms but seems fine

@OmerBenGera
Copy link
Member

OmerBenGera commented Jul 20, 2023

Check out latest dev build, will hopefully improve performance even more.

@WarnDa
Copy link
Author

WarnDa commented Jul 26, 2023

Here is a spark : https://spark.lucko.me/7KViBS6xMB
image
I recalculed 1 island that contains 14 millions blocs inside

@OmerBenGera
Copy link
Member

Most of the lag is due to the iteration on blocks, and not SSB's code.
I can't really do much regarding this.

@WarnDa
Copy link
Author

WarnDa commented Jul 28, 2023

Yes no problem, it's far better than before, thanks for all theses update !

@WarnDa WarnDa closed this as completed Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✔️ Confirmed Confirmed bugs that can be replicated 🔧 Potential fix A potential fix was already submitted
Projects
None yet
Development

No branches or pull requests

2 participants