[0.17.38] One inserter cost 20 UPS

This subforum contains all the issues which we already resolved.
Gymble
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Jul 29, 2014 11:04 am
Contact:

[0.17.38] One inserter cost 20 UPS

Post by Gymble »

Hello

On my current game, while deconstructing a (very) small part of the factory, I noticed a strange huge UPS gain.
I tracked it down to deconstructing some inserters. In fact even destructing a single one make my UPS jump from 15 to 35.

The game is slightly modded but I do not expect any of them to interact in this specific issue.

Before removing inserter screenshot: https://drive.google.com/open?id=1smJk8 ... FZIfj6yN-P
After removing inserter screenshot: https://drive.google.com/open?id=1YB-iw ... YGFuYDiQRw

Log: https://drive.google.com/open?id=13etwD ... ImsIGY620C
Save: https://drive.google.com/open?id=1tRqEs ... zJw8iNMZld
Mods: https://drive.google.com/open?id=1-1GxN ... zArNPUmPgT

Have fun and keep the good job.

g.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.17.38] One inserter cost 20 UPS

Post by Bilka »

When I load your save, I have a UPS of 17.7, but update only takes 20-21 ms. With the update only taking 21 ms, I should have 47 UPS. This is the UPS that I get when I mine some inserters. This makes me think that something is artificially limiting UPS. However, the most obvious thing, game.speed, sits at a solid 1.

After some further investigation, I think it is the FPS is limiting UPS. Even in the pause screen, my FPS sits at 26, with the render preparation taking 18ms. The game will sacrifice UPS for FPS when FPS is below 60, so this is very plausible. So, I ran the profiler on it, and it looks like something in your undo queue is the problem. Yes, seriously. UndoShortcut::getTooltip is taking 47.22% of updates when only rendering (in escape menu). Looking at the tooltip, it looks like you constructed thousands of entities at once. Do you know how that could have happened? Some mod instant building blueprints, something along those lines.
Image

By doing anything else, you remove those thousands of entities from the top of your undo queue and down goes the render time of the tooltip and up goes your UPS.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Twinsen
Factorio Staff
Factorio Staff
Posts: 1359
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.17.38] One inserter cost 20 UPS

Post by Twinsen »

It's his epic solar array. He built those entities and added them to the queue.

The tooltip should be cached and not calculated every tick.
Gymble
Burner Inserter
Burner Inserter
Posts: 10
Joined: Tue Jul 29, 2014 11:04 am
Contact:

Re: [0.17.38] One inserter cost 20 UPS

Post by Gymble »

Right, I did expand my solar array with a 80k+ entity blueprint.
According to your analyse I just tested placing a single belt on the ground and it give me my UPS back.

Glad that this will help you perfect the game even more.
someone1337
Fast Inserter
Fast Inserter
Posts: 145
Joined: Wed Apr 26, 2017 11:29 pm
Contact:

Re: [0.17.38] One inserter cost 20 UPS

Post by someone1337 »

Could the devs consider adding a /clear-undo-queue [<player>] command which would allow players to wipe their own undo queue and serevr admins to wipe a given player's undo queue?
plz? :)
tehfreek
Filter Inserter
Filter Inserter
Posts: 391
Joined: Thu Mar 17, 2016 7:34 am
Contact:

Re: [0.17.38] One inserter cost 20 UPS

Post by tehfreek »

I think that once the optimization is in place the command won't be needed since the undo queue won't cripple the system.
someone1337
Fast Inserter
Fast Inserter
Posts: 145
Joined: Wed Apr 26, 2017 11:29 pm
Contact:

Re: [0.17.38] One inserter cost 20 UPS

Post by someone1337 »

maybe, but it still may be a good idea to be able to wipe my own undo queue
Post Reply

Return to “Resolved Problems and Bugs”