Page 1 of 1

[posila][0.16.51] framerate drop when drawing mutiple wires

Posted: Wed Aug 01, 2018 5:56 pm
by gheift
Hello,

I noticed a hugh framerate drop, when the game has to draw multiple wires. I attached a minimal save, where I could reproduce the issue. A also added a trace I recorded using

Code: Select all

perf record -F 100000 -p $(pidof factorio) -g
.

Kind regards,
Gerhard
perf report -n --stdio

Re: [0.16.51] framerate drop when drawing mutiple wires

Posted: Thu Aug 02, 2018 2:57 am
by Rseding91
Thanks for the report however I can't reproduce what you're seeing.

I suspect it's related to your graphics card and or drivers since the logic for rendering wires is identical to rendering the inserters and the tiles they all sit on. The only difference is more wires means more things drawn which can overload the graphics card if it can't keep up.

Re: [posila][0.16.51] framerate drop when drawing mutiple wires

Posted: Thu Aug 02, 2018 8:49 am
by posila
Thanks for the report.
Even though rendering was rewritten and greatly optimized for 0.17, your save uncovered performance problem even in the new renderer, so that's fixed.

But the core of the problem is that circuit connector sprites are not included in atlases with "Video memory usage" set to "High", so drawing of circuit connectors is not batched resulting in 10000 draw calls, which is quite bad, so we need to look into that too.

Ref: 69876

Re: [posila][0.16.51] framerate drop when drawing mutiple wires

Posted: Tue Jun 11, 2019 3:11 pm
by posila
Thanks for the report.
In the end I realized inserter has unique circuit connector, so I can just modify its flags so inserter base and the circuit connector end up in the same atlas and sprite batching can work properly.
Fixsed for 0.17.49