Efficiency of entities that have no power.
Moderator: ickputzdirwech
Efficiency of entities that have no power.
I have noticed that UPS doesn't change noticeably when nearly all of my factory is powered down.
Potentially this could be easy fix and this would help a lot building megabases as then I could power down some parts of my factory whilst working on other parts without massive slow down. Of course if it requires major reworking it probably not worth the effort.
Many thanks for the great game.
Potentially this could be easy fix and this would help a lot building megabases as then I could power down some parts of my factory whilst working on other parts without massive slow down. Of course if it requires major reworking it probably not worth the effort.
Many thanks for the great game.
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: Efficiency of entities that have no power.
I don't think we need to tell the devs how to make the game more efficient... they've proven themselves more than capable =P besides 0.15 will bring a ton of optimisations to make the game even more ludicrously efficient.
And it's possible your performance is due to graphics processing or memory speed.
And it's possible your performance is due to graphics processing or memory speed.
Money might be the root of all evil, but ignorance is the heart.
Re: Efficiency of entities that have no power.
I am not telling anyone what to do.
My point is that the game is very well optimised but it seems to spend a lot of CPU cycles on entities that are inactive because they don't have power. Of course this may have already been addressed, but I had the idea and so I suggested it, which is what this forum is for after all.
My point is that the game is very well optimised but it seems to spend a lot of CPU cycles on entities that are inactive because they don't have power. Of course this may have already been addressed, but I had the idea and so I suggested it, which is what this forum is for after all.
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: Efficiency of entities that have no power.
I didn't say you were telling them what to do, I meant it that they know what they're doing in terms of optimisation.
This forum is more for suggestions for the gameplay, as we don't know the inner workings we can't suggest improvements to them.
Just saying.
This forum is more for suggestions for the gameplay, as we don't know the inner workings we can't suggest improvements to them.
Just saying.
Money might be the root of all evil, but ignorance is the heart.
Re: Efficiency of entities that have no power.
"Powering down" things is one of the worse ways you can stop a factory. Simply not giving it any resources to consume/use is the ideal way.
The problem is: "powering down" an entity means the normal update logic on the entity can't run because there's no power to do things like "move the inserter arm". The entity has no update notification when power is restored so it can't disable itself.
Adding such a notification would be a gigantic waste of CPU time because 99% + of the time the entity has power or will have power next tick.
The problem is: "powering down" an entity means the normal update logic on the entity can't run because there's no power to do things like "move the inserter arm". The entity has no update notification when power is restored so it can't disable itself.
Adding such a notification would be a gigantic waste of CPU time because 99% + of the time the entity has power or will have power next tick.
If you want to get ahold of me I'm almost always on Discord.
Re: Efficiency of entities that have no power.
Fair enough thanks for the reply. I will work out another way of doing this.
Re: Efficiency of entities that have no power.
This is your gut feeling or did you test it somehow?Stevetrov wrote:My point is that the game is very well optimised but it seems to spend a lot of CPU cycles on entities that are inactive because they don't have power.
I don't really think that dealing with drain power usage is all that expensive in the big picture. I'd be surprised if it's more than a couple of percentages of total load in a megabase.
Re: Efficiency of entities that have no power.
Another reason for making beacons switch on/off on signals. Sadly switching beacons wasn't voted higher in circuit feature poll.Rseding91 wrote:"Powering down" things is one of the worse ways you can stop a factory. Simply not giving it any resources to consume/use is the ideal way.
The problem is: "powering down" an entity means the normal update logic on the entity can't run because there's no power to do things like "move the inserter arm". The entity has no update notification when power is restored so it can't disable itself.
Currently you have to decide between draining power for more UPS or switch power off at the expense of continuous "needless" UPS updates. Placing an inserter loop, removing/inserting modules on signals, next to every beacon simply takes too much space to be a feasible alternative.
My Mods: mods.factorio.com
Re: Efficiency of entities that have no power.
Making beacons switch off on signals would be the exact same as switching off through loss of power. It wouldn't save any additional UPS.Optera wrote:Another reason for making beacons switch on/off on signals. Sadly switching beacons wasn't voted higher in circuit feature poll.Rseding91 wrote:"Powering down" things is one of the worse ways you can stop a factory. Simply not giving it any resources to consume/use is the ideal way.
The problem is: "powering down" an entity means the normal update logic on the entity can't run because there's no power to do things like "move the inserter arm". The entity has no update notification when power is restored so it can't disable itself.
Currently you have to decide between draining power for more UPS or switch power off at the expense of continuous "needless" UPS updates. Placing an inserter loop, removing/inserting modules on signals, next to every beacon simply takes too much space to be a feasible alternative.
Circuit "switch off" is just a flag in the entity that forces it to not run the normal update logic. It's also one of the worse ways to "power down" something.
If you want to get ahold of me I'm almost always on Discord.
Re: Efficiency of entities that have no power.
I have found that removing the power gives greater UPS benefits than just stopping the material flow when you have heavy use of enabled conditions on your inserters. It could just be my imagination though.Rseding91 wrote:Circuit "switch off" is just a flag in the entity that forces it to not run the normal update logic. It's also one of the worse ways to "power down" something.
Re: Efficiency of entities that have no power.
Enable conditions also force the entity to stay active in the case of inserters because the inserter can't work due to the condition but otherwise is ready to go. There's no alarm system for when the logistic network changes.BenSeidel wrote:I have found that removing the power gives greater UPS benefits than just stopping the material flow when you have heavy use of enabled conditions on your inserters. It could just be my imagination though.Rseding91 wrote:Circuit "switch off" is just a flag in the entity that forces it to not run the normal update logic. It's also one of the worse ways to "power down" something.
If you want to get ahold of me I'm almost always on Discord.
Re: Efficiency of entities that have no power.
What would be the most CPU friendly way to manage 1k+ beacons?
- Have them on all the time?
Requires more power producing entities. - Use inserters to remove the modules on circuit condition?
Adds at least 2 inserters per beacon for another 2k entities. - Switch them off with power switches?
"one of the worse ways you can stop a factory", but it doesn't add a lot of extra entities.
My Mods: mods.factorio.com
Re: Efficiency of entities that have no power.
Leave them fully powered at all times. Solar panels have zero CPU cost to exist so you can just make more of them to give power to your beacons.Optera wrote:What would be the most CPU friendly way to manage 1k+ beacons?
- Have them on all the time?
Requires more power producing entities.- Use inserters to remove the modules on circuit condition?
Adds at least 2 inserters per beacon for another 2k entities.- Switch them off with power switches?
"one of the worse ways you can stop a factory", but it doesn't add a lot of extra entities.
If you want to get ahold of me I'm almost always on Discord.
Re: Efficiency of entities that have no power.
What about accumulators? I doubt calculating remaining charge is free.Rseding91 wrote:Leave them fully powered at all times. Solar panels have zero CPU cost to exist so you can just make more of them to give power to your beacons.Optera wrote:What would be the most CPU friendly way to manage 1k+ beacons?
- Have them on all the time?
Requires more power producing entities.- Use inserters to remove the modules on circuit condition?
Adds at least 2 inserters per beacon for another 2k entities.- Switch them off with power switches?
"one of the worse ways you can stop a factory", but it doesn't add a lot of extra entities.
My Mods: mods.factorio.com
Re: Efficiency of entities that have no power.
It's been my experience that thousands of idling biters is more CPU demanding than factory stuff. All those health regeneration checks, those random wandering motions, and always looking for something to kill. There has to be a better way.
Re: Efficiency of entities that have no power.
AFAIK both solar panels and accumulators follow same mechanics - they work as one grouped entity if the are connected to same networks.Optera wrote:What about accumulators? I doubt calculating remaining charge is free.Rseding91 wrote:Leave them fully powered at all times. Solar panels have zero CPU cost to exist so you can just make more of them to give power to your beacons.Optera wrote:What would be the most CPU friendly way to manage 1k+ beacons?
- Have them on all the time?
Requires more power producing entities.- Use inserters to remove the modules on circuit condition?
Adds at least 2 inserters per beacon for another 2k entities.- Switch them off with power switches?
"one of the worse ways you can stop a factory", but it doesn't add a lot of extra entities.
Re: Efficiency of entities that have no power.
I don't think they do. It's possible to have accumulators with different charge in same network. You have that every time you connect a new one to the network.orzelek wrote:AFAIK both solar panels and accumulators follow same mechanics - they work as one grouped entity if the are connected to same networks.
Though I wouldn't be surprised if all accumulators with equal charge level are grouped into one.
Re: Efficiency of entities that have no power.
Every entity can be part of multiple networks causing different charge and drain. Destroyed poles, newly placed entities and power switches switching once a tick at worse make generating groups from scratch every tick necessary. I don't see much potential to save CPU time by grouping accumulators.hoho wrote:I don't think they do. It's possible to have accumulators with different charge in same network. You have that every time you connect a new one to the network.orzelek wrote:AFAIK both solar panels and accumulators follow same mechanics - they work as one grouped entity if the are connected to same networks.
Though I wouldn't be surprised if all accumulators with equal charge level are grouped into one.
My Mods: mods.factorio.com
Re: Efficiency of entities that have no power.
Solar panels and accumulators work as one entity if in one network (and have the same charge level).
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Efficiency of entities that have no power.
Accumulators are grouped like solar panels are.Optera wrote:What about accumulators? I doubt calculating remaining charge is free.Rseding91 wrote:Leave them fully powered at all times. Solar panels have zero CPU cost to exist so you can just make more of them to give power to your beacons.Optera wrote:What would be the most CPU friendly way to manage 1k+ beacons?
- Have them on all the time?
Requires more power producing entities.- Use inserters to remove the modules on circuit condition?
Adds at least 2 inserters per beacon for another 2k entities.- Switch them off with power switches?
"one of the worse ways you can stop a factory", but it doesn't add a lot of extra entities.
If you want to get ahold of me I'm almost always on Discord.