Fix lag when lavacooling sets lots of nodes

Post Reply

Do you want to have the changed lavacooling in minetest_game?

yes, please change the lavacooling
10
63%
no, I don't like this change
2
13%
no, I want that creating lavacooling mountains is impossible
1
6%
I hate you
3
19%
 
Total votes: 16

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Fix lag when lavacooling sets lots of nodes

by Hybrid Dog » Post

I edited the lavacooling function that it uses vmanip if many nodes become cooled:
https://github.com/HybridDog/minetest_g ... s.lua#L146
This greatly decreases server lag when e.g. someone makes a lavacooling mountain.

Sometimes I can see such a mountain created with lavacooling on a server, often it's made by me but not every time.
Image
Image
I have much more pictures, tell me if you want to see them, some of the mountains are much bigger.

https://github.com/HybridDog/lavacoolin ... 9b5ee1fe9e

I changed the code of my lavacooling mod that creating such a mountain with a lava and water bucket (or something else with lava and water) doesn't cause a server lag that it needs to become shut down because it's fairly impossible to continue playing there without disabling lavacooling (except on fast computers).
After that l changed the lavacooling of default in my version of minetest_game. Calinou's carbone game uses the code.
Attachments
somewhere1.png
somewhere1.png (236.04 KiB) Viewed 689 times
jeijamap_1.png
jeijamap_1.png (152.24 KiB) Viewed 690 times
Last edited by Hybrid Dog on Sat Sep 10, 2016 12:13, edited 4 times in total.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: reduce the lag of creating lavacooling mountains

by Krock » Post

Lava-water-stone mountains on no-rule-servers: HAHA! trololo system ressources :PP !!111!11!!1!1
Lava-water-stone mountains on serious servers: No- please not.
A speedup can be produced with faster water flowing and maybe using voxelmanip for it.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
HeroOfTheWinds
Member
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero
Location: Hawaii

Re: reduce the lag of creating lavacooling mountains

by HeroOfTheWinds » Post

I'm not sure if it's just my terrible internet, but it always seems to me that lava creates tremendous lag whenever I'm near it. Anything to lessen this is appreciated.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: reduce the lag of creating lavacooling mountains

by Hybrid Dog » Post

Krock wrote:...and maybe using voxelmanip for it.
I thought the vote was made for this... maybe I understood something wrong

HeroOfTheWinds wrote:I'm not sure if it's just my terrible internet, but it always seems to me that lava creates tremendous lag whenever I'm near it. Anything to lessen this is appreciated.
Does the server use special mods?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: reduce the lag of creating lavacooling mountains

by paramat » Post

When i added lavacooling to watershed, i noticed that default mod lavacooling has an interval of 1 and a chance of 1. So every second, every lava node has all it's neighbours checked for water nodes, this results in instant and fast lavacooling, but also large processing spikes, the interval and chance should be changed to avoid this, for slower and more gradual cooling.

User avatar
HeroOfTheWinds
Member
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero
Location: Hawaii

Re: reduce the lag of creating lavacooling mountains

by HeroOfTheWinds » Post

Hybrid Dog wrote:
HeroOfTheWinds wrote:I'm not sure if it's just my terrible internet, but it always seems to me that lava creates tremendous lag whenever I'm near it. Anything to lessen this is appreciated.
Does the server use special mods?
The only one that I can think of that would affect that is the mod (can't remember the name) that causes particles to fly up from the lava, as well as add a flowing water sound when water is near.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

Re: reduce the lag of creating lavacooling mountains

by Jordach » Post

Will take a look into it via BFD, have a feeling it's the internet side and not server: in BFD I have seen any lag with lavacooling, due to being 64bit. And playing locally.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: reduce the lag of creating lavacooling mountains

by Hybrid Dog » Post

HeroOfTheWinds wrote:
Hybrid Dog wrote:
HeroOfTheWinds wrote:I'm not sure if it's just my terrible internet, but it always seems to me that lava creates tremendous lag whenever I'm near it. Anything to lessen this is appreciated.
Does the server use special mods?
The only one that I can think of that would affect that is the mod (can't remember the name) that causes particles to fly up from the lava, as well as add a flowing water sound when water is near.
maybe it's the old particles mod

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
HeroOfTheWinds
Member
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero
Location: Hawaii

Re: reduce the lag of creating lavacooling mountains

by HeroOfTheWinds » Post

Hybrid Dog wrote: maybe it's the old particles mod
I looked up the mods on the server. The mod in question is [dplus].
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: reduce the lag of creating lavacooling mountains

by Hybrid Dog » Post

https://github.com/HybridDog/minetest_g ... d43fbed3e3
I need to change the "[lavacooling]" message and use minetest.log.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: reduce the lag of creating lavacooling mountains

by Calinou » Post

Carbone implemented the lava cooling changes (which also seems to prevent sound spam), thank you. It also logs it.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: reduce the lag of creating lavacooling mountains

by Hybrid Dog » Post

Calinou wrote:Carbone implemented the lava cooling changes (which also seems to prevent sound spam), thank you. It also logs it.
I don't know if you changed it at carbone yet, I fixed the liquid flow update:
https://github.com/HybridDog/minetest_g ... 408e43R232

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: reduce the lag of creating lavacooling mountains

by Krock » Post

Hybrid Dog wrote:I don't know if you changed it at carbone yet, I fixed the liquid flow update:
https://github.com/HybridDog/minetest_g ... 408e43R232
Thanks.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Dragonop
Member
Posts: 1233
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop
Location: Argentina

Re: reduce the lag of creating lavacooling mountains

by Dragonop » Post

Why the colors in the pictures look so bright?

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: reduce the lag of creating lavacooling mountains

by Krock » Post

Dragonop wrote:Why the colors in the pictures look so bright?
You can take screenshots at night and make them brighter. It's not fully dark at night, that's why it's possible.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests