Page 1 of 1

[Lou][2.0.41][linux] Performance drop in fulgora night

Posted: Wed Mar 19, 2025 9:14 pm
by schwubdiwub
What did you do?
I didn't do anything in particular

What happened?
While fulgora daytime performance is normal (3ms update time) and at night the performance drops (22ms update time)

What did you expect to happen instead? It might be obvious to you, but do it anyway!
Performance at night is close to same while daytime

Does it happen always, once, or sometimes?
Always


Additional info:
I don't really have anything big built on fulgora or on any planet, but I have discovered quite a bit of the fulgora map. When looking at the active chunks at day and at night, basically the whole map gets updated at night (but not at daytime) even thought there are no player buildings or units in or around those chunks.
I use some basic mods, but the problem persists even with all mods disabled.


For reproduction, you can just open the save file and wait for the night.
save file: https://drive.google.com/file/d/1YMGd6w ... drive_link

Re: [2.0.41][linux] Performance drop in fulgora night

Posted: Thu Mar 20, 2025 12:33 pm
by Rseding91
Thanks for the report. It looks like currently the cost of lightning is roughly O(N) with the number of chunks explored. Since you've force charted a huge rectangle area of the planet - you're getting a lot of lightning in all of the revealed area.

I don't currently have an answer for this except "don't do that" and or delete the extra chunks with a command such as this:

Code: Select all

/c
local surface = game.surfaces["fulgora"]
 for chunk in surface.get_chunks() do
  if (chunk.x < -100 or chunk.x > 100 or chunk.y < -100 or chunk.y > 100) then
    surface.delete_chunk(chunk)
  end
end

Re: [2.0.41][linux] Performance drop in fulgora night

Posted: Thu Mar 20, 2025 1:15 pm
by schwubdiwub
Hey, thanks for the fast reply. The deletion of the outer chunks indeed "fixed" the problem.

Re: [Lou][2.0.41][linux] Performance drop in fulgora night

Posted: Thu Mar 20, 2025 2:52 pm
by Lou
Once again thanks for the report. The most of the update time was taken by the smoke created by lightnings, which we made to not be created when not visible. Since 2.0.43, Fulgora night-time performance should be basically the same as daytime.