The Flamethrower turret is a big performance hog.
Maybe too many damage calculations? Maybe too many flames?
I am creating custom maps for the community and wish the flamethrower turrets would not put the game in a slow motion mode when they fire up.
The issue arrises usually in later game stages. When a ton of biters cluster together and run into the fire.
I have not found a way to resolve this lag, except limiting the turrets.
They are also ridiculously powerful and i wish they would be rebalanced in general to a more reasonable damage output.
Flamethrower turret performance issues
Re: Flamethrower turret performance issues
If you provide a save, we can look into what is slow and if we can optimize it.
Re: Flamethrower turret performance issues
The save file is too big maybe to attach it, hope this link is fine enough?
https://www.file-upload.net/download-13 ... 9.zip.html
The performance drain from flame turrets happens in other maps too.
https://www.file-upload.net/download-13 ... 9.zip.html
The performance drain from flame turrets happens in other maps too.
Re: Flamethrower turret performance issues
I can confirm this. I've played on many custom PVE servers and have come across this on each and every one. A flame turret biter defence slows the server down so much we soon after have to restart the map because it becomes unbearable.
Like this: 100% simulation speed > a huge biter wave spawns and start moving > about a 15% simulation slowdown > flame turrets start firing > 60-80% slowdown (depending on the amount of turrets) > biters dead > 100% speed again
Like this: 100% simulation speed > a huge biter wave spawns and start moving > about a 15% simulation slowdown > flame turrets start firing > 60-80% slowdown (depending on the amount of turrets) > biters dead > 100% speed again
Re: Flamethrower turret performance issues
Also, it's not as bad when there aren't that many people on the server. When there are 10+ players it's extremely slow. I am still not certain if that's because the server is struggling or if some player's potato computers are slowing down the game.
Re: Flamethrower turret performance issues
Looks like the sticker "fire" looks for trees on every tick, not only on entity creating.
Re: Flamethrower turret performance issues
If someones machine is struggling, then that shouldn't slowdown the server. (That particular player might experience fps drops, or even endup lagging behind the server).
Also the standard info requested for performance issues is what's in the following post viewtopic.php?f=7&t=3638#p299295 .
Re: Flamethrower turret performance issues
Hey, I downloaded the save just before leaving for Christmas and forgot about it when I came back.
When UPS drops down, about 10% of update time is spent dispatching entity damaged and entity died events to the scenario script.
All the explosions generate lot of particles, and they take quite a lot of time to update, AND make fire-flame update slower as fire searches for entities to deal damage to, so the entity search is slower as it has to iterate through all the random junk (particles, corpses) to find entities with health. We have non-entity based particle system in our backlog, but it probably won't make it to 0.17. Particle update + entity search in fire takes up about another 10% of the update time.
darkfrei mentioned Sticker, virtually all the time spent in Sticker::update is due to Lua event dispatching.
Another 10% are spent in unit update.
Rest is factory, leading with 10% in inserter update.
When UPS drops down, about 10% of update time is spent dispatching entity damaged and entity died events to the scenario script.
All the explosions generate lot of particles, and they take quite a lot of time to update, AND make fire-flame update slower as fire searches for entities to deal damage to, so the entity search is slower as it has to iterate through all the random junk (particles, corpses) to find entities with health. We have non-entity based particle system in our backlog, but it probably won't make it to 0.17. Particle update + entity search in fire takes up about another 10% of the update time.
darkfrei mentioned Sticker, virtually all the time spent in Sticker::update is due to Lua event dispatching.
Another 10% are spent in unit update.
Rest is factory, leading with 10% in inserter update.