[0.15.26] Performance issue with Biters

Bugs that are actually features.
Aes Sedai
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Jan 08, 2016 12:37 am
Contact:

[0.15.26] Performance issue with Biters

Post by Aes Sedai »

I've submitted this to the Rampant github page a little over a week ago, and have played about 50 hours since I first reported this issue. Following is the mostly-original issue text.

===

I started a new save when Factorio 0.15.x was released, and modified the settings to be a combination of the Rail World + Death World presets (I like a very aggressive biter presence). Map view:
Map View
Map View
Screenshot_152.png (891.26 KiB) Viewed 3382 times
Recently (around the release of ~0.15.20), we've been experiencing periodic slowdowns of the game. We played with Rampant on Factorio 0.14.x and experienced massive slowdowns later into the game but they were more persistent than the slowdowns we've been experiencing in 0.15.x. Every 3-5 minutes or so, FPS and UPS both will drop from 60 to lower 20s - 30s and this will persist for anywhere from 10 - 45 seconds, usually.

We've come to the conclusion that it's possibly related to biter attack waves. While the script update time for Rampant doesn't increase over 1ms during these slowdowns, the Entity update time usually reaches 40ms and has spiked to over 80ms before. The slowdowns appear to happen when the biters reach the engagement range of our turret defenses:
Dead biters
Dead biters
Screenshot_153.png (9.59 MiB) Viewed 3382 times
Given the density of biters on our save and the level of evolution, we almost always have at least one attack wave incoming, but when multiple waves hit at the same time the game starts to crawl.

I've uploaded the save + mods to Google Drive for testing, but I'm not certain that the issue can be resolved easily since it appears to be Factorio's entity handling code that is suffering under the stress.

===

Since I submitted that, we've played about 50 hours more on the world and now experience persistent lag (~50 FPS/UPS normally), with dips down to ~15 - 25 FPS/UPS occasionally with the dips seeming related to the Biters. At this point I'm not too surprised that the game is lagging regularly because of how large the base is.
Here is the save in it's current state.

Thanks.
jonatkins
Fast Inserter
Fast Inserter
Posts: 155
Joined: Wed Sep 30, 2015 7:29 pm
Contact:

Re: [0.15.26] Performance issue with Biters

Post by jonatkins »

Does the FPS drop occur during the biter attacks, while the enemies are dying? I recently discovered the blood particle effects from killing enemies can lag the game. While it's at it's worst when they're visible on-screen, they're still pretty bad even when not visible.

I did report this, but it was rejected as 'not a bug' - viewtopic.php?f=23&t=45973

You could try the simple mod I wrote that disables these particle effects - https://mods.factorio.com/mods/jonatkins/AlienBloodFix
Aes Sedai
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Jan 08, 2016 12:37 am
Contact:

Re: [0.15.26] Performance issue with Biters

Post by Aes Sedai »

@jonatkins

Veden (author of Rampant) actually pointed that mod out to me on the Github issue, and it's in the second save. From what I noticed, it seemed that adding your mod helped reduce the duration of the slowdowns, but did not eliminate them.
jonatkins
Fast Inserter
Fast Inserter
Posts: 155
Joined: Wed Sep 30, 2015 7:29 pm
Contact:

Re: [0.15.26] Performance issue with Biters

Post by jonatkins »

Glad it's of some help.

I wasn't 100% sure if the particle FPS issue was just my PC, and I'd not had any feedback on the mod so far.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.15.26] Performance issue with Biters

Post by Oxyd »

What I'm seeing is that a mod – presumably Rampant – creates some pretty huge unit groups and uses them to attack.

Image

The mod's update time will be low since it only assigns commands to units, and the slowdown then comes from the biters' AI, which is accounted to “entity update”.

There is some room for optimisation here, but massive swarms will always tax the CPU. So I'll blame Rampant (or some other mod) for this.

Not a bug.
Post Reply

Return to “Not a bug”