Ammo Loader+


More than just a turret loader. Auto load everything from turrets to artillery wagons to furnaces and even the player themselves. Auto upgrade ammo and fuel without tedious manual replacement. Infinite range and compatible with Factorissimo2.

Content
16 days ago
0.14 - 1.1
21.2K
Logistics

g Major performance issue with blueprints

6 years ago

First off, thanks for the great mod!

One problem I had in Factorio 15.x was as the game progressed, placing a blueprint could cause long pauses. We had to actually quit playing the game it got so bad. (20 second pause with larger blueprints). And I've got pretty decent hardware.

It appears the code to check for new potential turrets to fill might be working really hard when placing large blueprints. I'm guessing every time you place something it iterates to see if that's a turret you placed. So a blueprint of 500 items is going to iterate 500 times?

6 years ago

Hm thanks for the heads up, i wasnt aware of this issue.

I think you may be right, i never use many blueprints in my game so i didnt think to optimize for that situation. I just need to add in a clause to ignore blueprints on the entity built event I think. Ill take a look at it the next chance i get, most likely not until the weekend though.

Makes me sad that you had to quit a game because of that, I hate having to restart because of something i had no control over. thanks for taking the time to try the update anyway!

6 years ago

Hopefully fixed, I set the limit to 50 per tick as of right now, which worked fine on my pc, but this may need to be adjusted for multiplayer.

6 years ago

Just to add to this, when placing a large blueprint, such as 3x3 chunks of saplings, The memory usage of Factorio climbs up over 6GB and eventually runs out of memory with the below error. Interestingly, this happens just with the mod installed, even without any loader chests placed in the world.

1481.438 Error MainLoop.cpp:940: Exception at tick 19566112: Error while running event ammo-loader::on_built_entity (ID 6)
not enough memory

New response