[0.17.31] [modded] huge UPS drop when holding a blueprint.

Bugs that are actually features.
Post Reply
credomane
Filter Inserter
Filter Inserter
Posts: 253
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

[0.17.31] [modded] huge UPS drop when holding a blueprint.

Post by credomane » Fri Jun 07, 2019 1:20 am

I've been playing on a server (that's been slow to update) everything's been going great until last week. Now (or at least it has only become bad enough now) whenever any player picks up a blueprint to place into the world every connected player has their FPS tank from 60 to 5fps. It becomes nearly impossible to restore everything to normal without pausing the game for clients to catch up again before unpausing. Upon investigation over several days the issue seems to be related (from my limited view) to 60844. The "render preparation" goes from <1-4ms all the way up to ~40ms instantly. I've tried updating factorio to 0.17.45 and updating all mods but the issue still persists. It might have something to do with the fact that the blueprints (i honestly have no idea, really, but it is my best guess) all "create" about 3k+ core/cursor-boxes.png sprites at a minimum when holding the blueprint for placement while the biggest offenders tend to create 13k+ of the core/cursor-boxes.png sprite. These blueprint aren't even that big, imo, to be creating so many instances of that sprite.

In MP this spike in "render prep" makes fps drop to 5fps. This, as we know, is because the client is trying the best it can to keep up with the server's 60ups.
Then in SP this make my ups drop to 20-32 depending on the BP and fps follows suit because fps is always less-than-or-equal to UPS.

Attached or linked is:
A perf log from the debug menu showing before holding a bp then holding a bp for about 2 seconds each.
220MB zip file of mods used on the server. https://drive.google.com/file/d/1TyxpsM ... sp=sharing
21MB save from the server. https://drive.google.com/file/d/1dD1K97 ... sp=sharing
time-usage screenshot
gpu-usage screenshot

blueprint shown in the screenshots is the worst offender for this issue that i've found. Let me know of any other info you might need or want and I'll do my best to provide it. I know support for modded is limited but I'm thinking and hoping this is also a vanilla issue too.
Attachments
time-usage.png
time-usage.png (2.97 MiB) Viewed 272 times
gpu-time-usage.png
gpu-time-usage.png (2.82 MiB) Viewed 272 times
factorio-perf-01731_20190605-182038_OGL_i5-8400@2.80~16GB~GTX1660_Ti~6144MB.csv
(109.12 KiB) Downloaded 6 times

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 3642
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.31] [modded] huge UPS drop when holding a blueprint.

Post by Klonan » Tue Jun 11, 2019 8:31 pm

I think this is related to viewtopic.php?f=30&t=61861

So if it persists in the next release let us know by reposting the bug report with a log from the latest version

posila
Factorio Staff
Factorio Staff
Posts: 3623
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.31] [modded] huge UPS drop when holding a blueprint.

Post by posila » Tue Jun 11, 2019 10:21 pm

Unfortunatelly it is not related.

61861 is about suboptimal sprite batching, resulting into many draw calls each with small CPU overhead, resulting in very low FPS. (Render time is high)

This is about creating dummy entities in order to render the blueprint and do buildability checks, eating time of the update. (Render preparation is high; Render is normal = under 16ms)

tehfreek
Filter Inserter
Filter Inserter
Posts: 348
Joined: Thu Mar 17, 2016 7:34 am
Contact:

Re: [0.17.31] [modded] huge UPS drop when holding a blueprint.

Post by tehfreek » Tue Jun 11, 2019 10:59 pm

Can some buildability checks be deferred until the next update? That way only the eventual placement will lag (because of course all buildability checks will need to be performed at once then).

kovarex
Factorio Staff
Factorio Staff
Posts: 7383
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.17.31] [modded] huge UPS drop when holding a blueprint.

Post by kovarex » Sat Jun 15, 2019 7:04 am

Yes, that blueprint is HUGE, and rendering so huge amount of previews and all the info takes some time. So this is expected. I'm saying not a bug. (Yes it could be optimized out, but only to let people to preview even bigger blueprints etc.)

Post Reply

Return to “Not a bug”

Who is online

Users browsing this forum: cherrywabbit