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

This subforum contains all the issues which we already resolved.
gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

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

Post 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
Attachments
factorio-current.log
(3.25 KiB) Downloaded 199 times
test-frame-drop-3.zip
minimal save file
(3.73 MiB) Downloaded 195 times
screenshot including timing information
screenshot including timing information
screenshot-2018-08-01_19-35-03.jpg (4.76 MiB) Viewed 4558 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14273
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.51] framerate drop when drawing mutiple wires

Post 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.
If you want to get ahold of me I'm almost always on Discord.
posila
Factorio Staff
Factorio Staff
Posts: 5349
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

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

Post 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
posila
Factorio Staff
Factorio Staff
Posts: 5349
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

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

Post 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
Post Reply

Return to “Resolved Problems and Bugs”