[0.17.X] Optimize UPS @ Electric Networks plz

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
YunoAloe
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 12, 2019 9:22 pm
Contact:

[0.17.X] Optimize UPS @ Electric Networks plz

Post by YunoAloe »

In debug mode my electric network is shown to consume as much time as entities, at 3 msec each currently, and they grow together as I build my base. I'm playing ~100 mods of ABPy+ game, consisting almost entirely from top-trending stuff. I can't find anyone on the internet mentioning electric network being the top consumer of UPS. Can somebody point me to any tips on optimizing electric networks, like replace all poles with substations? Maybe some known mods can cause this, like Factorissimo? I set electric updates to be 2 times less often in it, it noticeably (10-20%) reduced time usage by Factorissimo script, but not by electric network.
Also, is there a way to further debug this?

Added some screenshots.
3.4 for entities, 2.3 for electric network. The base is not big for now:
20190516225458_1.jpg
20190516225458_1.jpg (669.26 KiB) Viewed 2392 times
Everything is on one network (enabled show-network-connected-entities & show-energy-sources-networks):
20190516225333_1.jpg
20190516225333_1.jpg (1.12 MiB) Viewed 2392 times
But each factory building has it's own network:
20190516225800_1.jpg
20190516225800_1.jpg (550.35 KiB) Viewed 2392 times
And I have about 80 of those buildings. Does Factorio not like multiple networks perhaps?

Also attached modlist with mods settings, should they be needed.
Attachments
modlist.zip
(6.38 KiB) Downloaded 72 times
Last edited by YunoAloe on Mon May 20, 2019 5:30 pm, edited 5 times in total.

YunoAloe
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 12, 2019 9:22 pm
Contact:

Re: [0.17.X] How to optimize UPS @ Electric Network?

Post by YunoAloe »

Around half of my base is in factories. After I uprooted all factory buildings (I assume they still exist as surfaces, with their contents and respective networks, just not connected anymore and power-drained), timing dropped from 2.3 to 1.5. After I disabled Factorissimo, timing dropped to 0.27. :(

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.17.X] How to optimize UPS @ Electric Network?

Post by orzelek »

YunoAloe wrote:
Thu May 16, 2019 9:05 pm
Around half of my base is in factories. After I uprooted all factory buildings (I assume they still exist as surfaces, with their contents and respective networks, just not connected anymore and power-drained), timing dropped from 2.3 to 1.5. After I disabled Factorissimo, timing dropped to 0.27. :(
Thats the drawback of Factorissimo - it needs to transfer all the resources between surfaces in lua. It's pretty efficient but as you get more of them it will show up in stats.

YunoAloe
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 12, 2019 9:22 pm
Contact:

Re: [0.17.X] How to optimize UPS @ Electric Networks, Factorissimo?

Post by YunoAloe »

I'd really love someone from Factorio staff to comment on this.

- Is this issue known?
- Is the problem in multiple networks, multiple surfaces, or something else?

And most importantly:
- Do you consider giving electric networks some (threaded?) love like you did to fluids lately? Factorissimo is one of the most popular mods, and the very trending Earendel's Space Exploration is using surfaces too, and there are new ones likely to come. Having performance of 100 electric networks being 5-10 times worse than 1 of same total size is definitely showing potential for improvement.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.X] Optimize UPS @ Electric Networks plz

Post by Rseding91 »

It's working correctly. Electric networks are designed for their primary use-case: one large network. Multiple tiny networks will perform much worse than the one big network.

It's not a "hasn't been optimized for small networks" but a "has been optimized for large networks". You can't get both: making small networks faster would make large ones slower.

Trying to run them in threads also isn't likely to ever happen since the primary use case is one big network which would see zero advantage to being run in another thread and in fact would just run slower due to the thread overhead.
If you want to get ahold of me I'm almost always on Discord.

YunoAloe
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 12, 2019 9:22 pm
Contact:

Re: [0.17.X] Optimize UPS @ Electric Networks plz

Post by YunoAloe »

Thanks for commenting. I guess I'll have to unpack half my base from factories then, as with such trend it'll be impossible to finish an ABPy+ game without UPS drops. It's still doable at this point...

MagmaMcFry
Inserter
Inserter
Posts: 37
Joined: Sun Jul 17, 2016 9:05 pm
Contact:

Re: [0.17.X] Optimize UPS @ Electric Networks plz

Post by MagmaMcFry »

Rseding91 wrote:
Mon May 20, 2019 11:55 pm
It's working correctly. Electric networks are designed for their primary use-case: one large network. Multiple tiny networks will perform much worse than the one big network.
In that case I'd really like for Factorio to support connecting electric networks across surfaces, so I can get Factorissimo to work within the optimized case. Would such a cross-surface connection feature mess with optimization too?
I don't visit the forum very often. If you want to contact me, message me on the mod portal for Factorissimo-related things, or on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.X] Optimize UPS @ Electric Networks plz

Post by Rseding91 »

MagmaMcFry wrote:
Tue May 21, 2019 9:02 pm
Rseding91 wrote:
Mon May 20, 2019 11:55 pm
It's working correctly. Electric networks are designed for their primary use-case: one large network. Multiple tiny networks will perform much worse than the one big network.
In that case I'd really like for Factorio to support connecting electric networks across surfaces, so I can get Factorissimo to work within the optimized case. Would such a cross-surface connection feature mess with optimization too?
Cross-surface entities/mechanics is something I've been thinking about for some time.
If you want to get ahold of me I'm almost always on Discord.

Koub
Global Moderator
Global Moderator
Posts: 7203
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: [0.17.X] Optimize UPS @ Electric Networks plz

Post by Koub »

[Koub] Considering the above, I'm moving this to Ideas and suggestions.
Koub - Please consider English is not my native language.

Post Reply

Return to “Ideas and Suggestions”