[Rseding91] [0.14.16] Performance scaling issues with large containers

This subforum contains all the issues which we already resolved.
Post Reply
hansson
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue Jun 28, 2016 10:31 pm
Contact:

[Rseding91] [0.14.16] Performance scaling issues with large containers

Post by hansson »

Disclaimer: Below is not really a problem in the practical sense when using vanilla containers due to their size. The problem only become apparent when using modded large containers, such as warehouses or similar, but can be observed with vanilla containers as well.

I noticed in one of my heavily modded games that using warehouses (https://mods.factorio.com/mods/anoyomouse/Warehousing) made the game freeze at times when the GUI was opened. I made some tests and have found that the "Gui update" part shown when debug info (F5) is on seems to increase by some amounts depending on the size of the container, when the GUI of the container is open and the mouse is hovering above either an item or an empty slot. For example:

Idle (not doing anything, no GUI open, no actions taken):
Image

Hovering over an empty slot in a wooden box:
Image

Hoveering over an empty slot in a steel box:
Image

Hovering over an empty slot in a warehosue:
Image

Hovering over an empty slot in a storage warehouse (more slots than a ordinary warehouse):
Image

Notice how the "Gui update" part seems to increase as the size of the containers do. The issue, however, starts to manifest for real when there are items in the containers, you hover above said items and you move the cursor. For all our sanitys sake, I will just paste images for the wooden box and storage warehouse examples, since these are the smallest and largest containers I have readily available. Now of course it's probably very reasonable that the "Gui update" part is increased when you move the cursor around between selections, the point I'm trying to make is that it seems to scale excessively with size of the container - which seems less reasonable.

Hovering over an item in a wooden box:
Image

Moving the cursor around over items in a wooden box:
Image

Hovering over an item in a storage warehouse:
Image

Moving the cursor over items in a storage warehouse:
Image

Now it's worth mentioning that if you move the cursor "too fast" (which is not very fast at all - "barely moving" would be a better term) in the full storage warehouse, the game grinds to a complete halt.

I hope the amount of images does not make you twitch too hard - I just wanted to attempt to make it clear what I mean with this bug report :) Hopefully I succeeded at least a little bit. I urge you to load up the save and experience the issue for yourselves, it's difficult to describe the behavior in only text and pictures.

Mod list:
Warehousing 0.0.11
base 0.14.16
creative-mode 0.1.5

Zip file with save attached.
Attachments
bug_report.1.zip
(798.24 KiB) Downloaded 99 times


hansson
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue Jun 28, 2016 10:31 pm
Contact:

Re: [Rseding91] [0.14.16] Performance scaling issues with large containers

Post by hansson »

I made a poor quality (that ended up being enormous anyway) gif in an effort to be even more clear:

http://i.imgur.com/T9AnLXe.gifv

One thing I noticed was that when hovering around in the warehouse, the FPS drops but not the UPS. In the storage warehouse, both drops significantly with freezelag. I suppose it's reasonable for there to be FPS lag when the slowdown is reported in the "Gui update".

Rseding91
Factorio Staff
Factorio Staff
Posts: 13347
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.14.16] Performance scaling issues with large containers

Post by Rseding91 »

What graphics card do you have? I get some minor slowdown myself but nothing on that scale.
If you want to get ahold of me I'm almost always on Discord.

hansson
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue Jun 28, 2016 10:31 pm
Contact:

Re: [Rseding91] [0.14.16] Performance scaling issues with large containers

Post by hansson »

What type of slowdown do you experience?

GTX970, i7-4770, you think this might be a hw issue?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13347
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.14.16] Performance scaling issues with large containers

Post by Rseding91 »

hansson wrote:What type of slowdown do you experience?

GTX970, i7-4770, you think this might be a hw issue?
It goes up to 12.5~ MS/tick on GUI update for me when I set the tooltip delay to 0 and moved my mouse around as fast as I could on the storage warehouse full of items.

I've got a GTX 970, i7-3930K, and a 2560x1600 resolution screen.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13347
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.14.16] Performance scaling issues with large containers

Post by Rseding91 »

I'm not sure why the performance is so much worse for you but I made some improvements for 0.15 around the slow code.

It was taking 12.5 MS/tick before and now takes roughly 2.6 MS/tick while moving the mouse over a full storage warehouse. So, roughly a 4.8x improvement.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”