Page 1 of 1

Fix lag when lavacooling sets lots of nodes

PostPosted: Tue Apr 22, 2014 20:18
by Hybrid Dog
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.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Wed Apr 23, 2014 11:21
by Krock
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.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Thu Apr 24, 2014 03:40
by HeroOfTheWinds
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.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Thu Apr 24, 2014 10:41
by Hybrid Dog
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?

Re: reduce the lag of creating lavacooling mountains

PostPosted: Thu Apr 24, 2014 14:22
by paramat
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.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Thu Apr 24, 2014 22:37
by HeroOfTheWinds
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.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Fri Apr 25, 2014 06:59
by Jordach
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.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Fri Apr 25, 2014 11:27
by Hybrid Dog
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

Re: reduce the lag of creating lavacooling mountains

PostPosted: Fri Apr 25, 2014 21:09
by HeroOfTheWinds
Hybrid Dog wrote:maybe it's the old particles mod

I looked up the mods on the server. The mod in question is [dplus].

Re: reduce the lag of creating lavacooling mountains

PostPosted: Thu May 22, 2014 18:50
by Hybrid Dog
https://github.com/HybridDog/minetest_g ... d43fbed3e3
I need to change the "[lavacooling]" message and use minetest.log.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Thu May 22, 2014 19:06
by Calinou
Carbone implemented the lava cooling changes (which also seems to prevent sound spam), thank you. It also logs it.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Thu Oct 23, 2014 13:08
by Hybrid Dog
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

Re: reduce the lag of creating lavacooling mountains

PostPosted: Thu Oct 23, 2014 16:08
by Krock
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.

Re: reduce the lag of creating lavacooling mountains

PostPosted: Sat Oct 25, 2014 22:42
by Dragonop
Why the colors in the pictures look so bright?

Re: reduce the lag of creating lavacooling mountains

PostPosted: Sun Oct 26, 2014 09:28
by Krock
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.