Solaire Lights deprecated


Praise the sun! With your solar charged lamps, you can light your way without electricity and even briefly power other peripherals.

Utilities
7 years ago
0.14
5

b Large Slowdown

7 years ago

My world is a medium sized world, and I had this mod since the beginning of the world. Eventually I ended up with ~1600 solaire lights placed. Me and a friend noticed the game was running much slower than it should, roughly 33 UPS slow. After messing with the debug info I discovered the electric network was taking 14ms to update. I attempted to remove this mod and it crashed my game on load, so I made a command to remove the entities to test it.

The electric network is now taking 0.2ms to update and we're back at 60 UPS.

the command to remove all solaire lights:
/c
pos = game.player.position
surface = game.player.surface
area = {{pos.x - 5000, pos.y - 5000}, {pos.x + 5000, pos.y + 5000}}
for , enemyName in ipairs({"solaire-storage","solaire-pole","solaire-lamp","solaire-power"}) do
for
, entity in ipairs(surface.find_entities_filtered{area = area, name = enemyName}) do
entity.die()
end
end


I would like to say in addition, I loved this mod, but when you have a planet sized pile of them everywhere, it gets slow. Also, they were all connected to my main network, so that may have been some of my problem. This is just a word from the wise, it can get slow. However, with a few hundred it runs fine

New response