Performance optimization - post your saves

Post all other topics which do not belong to any other category.
Rseding91
Factorio Staff
Factorio Staff
Posts: 13986
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Performance optimization - post your saves

Post by Rseding91 »

sillyfly wrote:
Rseding91 wrote: ... it may help slightly ... takes half the time ...
Wube's optimization philosophy - saving 50% is only a slight improvement :D :D
Keep up the excellent work guys.
I actually found some additional things right after I said that so now in 0.16 it's around 280% faster. In 0.15 it takes 10 MS of prepare time and in 0.16 it takes 3.5 MS of prepare time.
If you want to get ahold of me I'm almost always on Discord.

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

Re: Performance optimization - post your saves

Post by Koub »

Rseding91 wrote:I actually found some additional things right after I said that so now in 0.16 it's around 280% faster.
280% faster ! We are now able to reverse time \o/ :mrgreen:
Koub - Please consider English is not my native language.

Mimos
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Mon Nov 07, 2016 5:15 pm
Contact:

Re: Performance optimization - post your saves

Post by Mimos »

Rseding91 wrote:I actually found some additional things right after I said that so now in 0.16 it's around 280% faster. In 0.15 it takes 10 MS of prepare time and in 0.16 it takes 3.5 MS of prepare time.
Thanks, that sounds good :-)

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

Re: Performance optimization - post your saves

Post by Rseding91 »

Koub wrote:
Rseding91 wrote:I actually found some additional things right after I said that so now in 0.16 it's around 280% faster.
280% faster ! We are now able to reverse time \o/ :mrgreen:
Not this again... it all depends how you calculate %. If it's current time / old time or old time / current time.

10 MS / 3.5 MS = you can do 3.5 MS 2.8 times (280% of the work that's done now could be done before it reaches the time spent before) or you calculate it as 3.5 MS / 10 MS = it takes only 35% as much time as it did before.

No matter which is used someone expecting the other form makes some joke about it not being possible to get that number.
If you want to get ahold of me I'm almost always on Discord.

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

Re: Performance optimization - post your saves

Post by Rseding91 »

JamelBF wrote: Thanks.Very useful.
If 0.16 it takes 3.5MS.
How you think about 0.17?Can you share your test please :)
I was simply mousing over the blueprint in the quickbar with the show-time-used debug option enabled.
If you want to get ahold of me I'm almost always on Discord.

Mimos
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Mon Nov 07, 2016 5:15 pm
Contact:

Re: Performance optimization - post your saves

Post by Mimos »

Rseding91 wrote:10 MS / 3.5 MS = you can do 3.5 MS 2.8 times (280% of the work that's done now could be done before it reaches the time spent before) or you calculate it as 3.5 MS / 10 MS = it takes only 35% as much time as it did before.
But isn't it 180% faster then? Or 280% as fast? ;)

mrvn
Smart Inserter
Smart Inserter
Posts: 5775
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Performance optimization - post your saves

Post by mrvn »

Mimos wrote:Factorio 15.37
I encountered significant slowdowns when using large blueprints. Both just mouseovering the blueprint item and also moving the ghost over the map. It causes a lot less slowdown if it is built and in operation.
Single player, empty map:
  • Mouseover zoomed in: fps drop (60 to 50), ups ok.
    • Render preparation/Gui render preparation going up to 13 from 0.5/0.1
      Render/Gui render going up to 6/5 from 0.5/0.1
    Mouseover zoomed out: fps drop (60 to 40), ups ok.
    • Render preparation/Gui render preparation going up to 14 from 1.5/0.1
      Render/Gui render going up to 9/5 from 3.8/0.1
    Placing it zoomed in: fps drop (60 to 40), ups ok.
    • Render preparation/Game render preparation going up to 21 from 0.5/0.3
      Render/Game render going up to 3.7/3.5 from 0.8/0.7
    Placing it zoomend out: fps drop (60 to 30), ups ok.
    • Render preparation/Game render preparation going up to 24 from 1.6/1.4
      Render/Game render going up to 6.8/6.7 from 3.7/3.6
Multiplayer, big, slow factory, me being the server:
  • for me: fps and ups drop from about 40 to 20.
    other players (having faster pcs): unplayable, hardly reacting to inputs.
large blueprint.txt
Maybe you can somehow speed up blueprints to have about the same speed as real buildings.
And now place the blueprint. You get a nice "Server is not responding" message while the server places the blueprint.

By the way: Why does other peoples client become unresponsive, not starting to move when you press a key, not stopping when you release a key, when one players system is busy with something? The client should send something like this to the server: "Player pressed w at tick X, player released w at tick Y." The client should not become totally unresponsive just because the FPS/UPS dropped a bit.

Gnark
Inserter
Inserter
Posts: 43
Joined: Tue Oct 18, 2016 10:15 am
Contact:

Re: Performance optimization - post your saves

Post by Gnark »

Hi,

I really like my game but this is now significantly dropping on FSP.
Do you know what I can do to keep going with this save ?

Thanks a lot.
Attachments
Game post 0.15 avec Gab.zip
(40.05 MiB) Downloaded 335 times

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

Re: Performance optimization - post your saves

Post by Rseding91 »

Gnark wrote:Hi,

I really like my game but this is now significantly dropping on FSP.
Do you know what I can do to keep going with this save ?

Thanks a lot.

You simply have a ton of belts. There's nothing new in that to optimize - if you want it to run faster you just can't build that much.
If you want to get ahold of me I'm almost always on Discord.

Gnark
Inserter
Inserter
Posts: 43
Joined: Tue Oct 18, 2016 10:15 am
Contact:

Re: Performance optimization - post your saves

Post by Gnark »

Rseding91 wrote:
Gnark wrote:Hi,

I really like my game but this is now significantly dropping on FSP.
Do you know what I can do to keep going with this save ?

Thanks a lot.

You simply have a ton of belts. There's nothing new in that to optimize - if you want it to run faster you just can't build that much.
Thanks for looking at it. If I replace somme belt with underground one ... will it help ?
I want to keep a belt factorie and not a robot one.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2368
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Performance optimization - post your saves

Post by Jap2.0 »

Gnark wrote:
Rseding91 wrote:
Gnark wrote:Hi,

I really like my game but this is now significantly dropping on FSP.
Do you know what I can do to keep going with this save ?

Thanks a lot.

You simply have a ton of belts. There's nothing new in that to optimize - if you want it to run faster you just can't build that much.
Thanks for looking at it. If I replace somme belt with underground one ... will it help ?
I want to keep a belt factorie and not a robot one.
That will help. There are also tons of belt optimizations in 0.16.
There are 10 types of people: those who get this joke and those who don't.

Xeteth
Fast Inserter
Fast Inserter
Posts: 158
Joined: Tue Feb 17, 2015 6:06 am
Contact:

Re: Performance optimization - post your saves

Post by Xeteth »

Found something new that absolutely tanked my FPS/UPS today.

I am making a 'Coal Bunker' which has a ton of storage chests - when I hold the blueprint in hand ready to place it my FPS/UPS takes a massive hit. It seems the slow down is caused under "Game Render Preparation".

The map otherwise works at 60/60.
PIC
BP STRING

mrvn
Smart Inserter
Smart Inserter
Posts: 5775
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Performance optimization - post your saves

Post by mrvn »

Xeteth wrote:Found something new that absolutely tanked my FPS/UPS today.

I am making a 'Coal Bunker' which has a ton of storage chests - when I hold the blueprint in hand ready to place it my FPS/UPS takes a massive hit. It seems the slow down is caused under "Game Render Preparation".

The map otherwise works at 60/60.
Blueprints have to check every entity to see if there is something beneath it that conflicts or needs to be deconstructed (with shift pressed). It can probably be optimized (e.g. pre-compute a single mask where trees need to be deconstructed instead of checking per entity) but as is a render slowdown isn't surprising.

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

Re: Performance optimization - post your saves

Post by Rseding91 »

mrvn wrote:
Xeteth wrote:Found something new that absolutely tanked my FPS/UPS today.

I am making a 'Coal Bunker' which has a ton of storage chests - when I hold the blueprint in hand ready to place it my FPS/UPS takes a massive hit. It seems the slow down is caused under "Game Render Preparation".

The map otherwise works at 60/60.
Blueprints have to check every entity to see if there is something beneath it that conflicts or needs to be deconstructed (with shift pressed). It can probably be optimized (e.g. pre-compute a single mask where trees need to be deconstructed instead of checking per entity) but as is a render slowdown isn't surprising.
That part of the logic is actually minimal. It's the copying of the blueprint in hand, adjusting it to the correct world position, rotating every entity, setting each entity up, and then destroying each one after it's rendered that takes the majority of the time.
If you want to get ahold of me I'm almost always on Discord.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2368
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Performance optimization - post your saves

Post by Jap2.0 »

Rseding91 wrote:
mrvn wrote:
Xeteth wrote:Found something new that absolutely tanked my FPS/UPS today.

I am making a 'Coal Bunker' which has a ton of storage chests - when I hold the blueprint in hand ready to place it my FPS/UPS takes a massive hit. It seems the slow down is caused under "Game Render Preparation".

The map otherwise works at 60/60.
Blueprints have to check every entity to see if there is something beneath it that conflicts or needs to be deconstructed (with shift pressed). It can probably be optimized (e.g. pre-compute a single mask where trees need to be deconstructed instead of checking per entity) but as is a render slowdown isn't surprising.
That part of the logic is actually minimal. It's the copying of the blueprint in hand, adjusting it to the correct world position, rotating every entity, setting each entity up, and then destroying each one after it's rendered that takes the majority of the time.

Do you really have to do that every tick? Would it be possible to only destroy and replace the items if you move the blueprint, and only change the orientation if you rotate the blueprint?
There are 10 types of people: those who get this joke and those who don't.

Xeteth
Fast Inserter
Fast Inserter
Posts: 158
Joined: Tue Feb 17, 2015 6:06 am
Contact:

Re: Performance optimization - post your saves

Post by Xeteth »

Rseding91 wrote:
mrvn wrote:
Xeteth wrote:Found something new that absolutely tanked my FPS/UPS today.

I am making a 'Coal Bunker' which has a ton of storage chests - when I hold the blueprint in hand ready to place it my FPS/UPS takes a massive hit. It seems the slow down is caused under "Game Render Preparation".

The map otherwise works at 60/60.
Blueprints have to check every entity to see if there is something beneath it that conflicts or needs to be deconstructed (with shift pressed). It can probably be optimized (e.g. pre-compute a single mask where trees need to be deconstructed instead of checking per entity) but as is a render slowdown isn't surprising.
That part of the logic is actually minimal. It's the copying of the blueprint in hand, adjusting it to the correct world position, rotating every entity, setting each entity up, and then destroying each one after it's rendered that takes the majority of the time.
I know large blueprints cause performance problems however I thought I'd post this one in particular because for whatever reason it seems to absolutely nuke FPS/UPS compared to other ones. I obviously have no idea how this is all done and whether it's based off the entity count or not but I can blueprint builds that have 3-4 times the number of entities without such a performance drop. Perhaps it's something to do with the storage chest entity or something?

bobucles
Smart Inserter
Smart Inserter
Posts: 1707
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Performance optimization - post your saves

Post by bobucles »

Core count means nothing. It's limited by RAM latency which is limited by the speed of light and the distance between the CPU and RAM sticks on motherboards.
Patch notes 0.19:
- The speed of light was causing a lot of performance issues but we found a workaround to increase it 180%. :D

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2368
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Performance optimization - post your saves

Post by Jap2.0 »

bobucles wrote:
Core count means nothing. It's limited by RAM latency which is limited by the speed of light and the distance between the CPU and RAM sticks on motherboards.
Patch notes 0.19:
- The speed of light was causing a lot of performance issues but we found a workaround to increase it 180%. :D
Only 180%? Man, the devs must be starting to get lazy.
:P
There are 10 types of people: those who get this joke and those who don't.

mrvn
Smart Inserter
Smart Inserter
Posts: 5775
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Performance optimization - post your saves

Post by mrvn »

Jap2.0 wrote:
bobucles wrote:
Core count means nothing. It's limited by RAM latency which is limited by the speed of light and the distance between the CPU and RAM sticks on motherboards.
Patch notes 0.19:
- The speed of light was causing a lot of performance issues but we found a workaround to increase it 180%. :D
Only 180%? Man, the devs must be starting to get lazy.
:P
Light is slowed down by gravity and you can make your CPU only have so much lighter with helium cooling.

The Eriksonn
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Jun 08, 2016 6:16 pm
Contact:

Re: Performance optimization - post your saves

Post by The Eriksonn »

mrvn wrote:
Jap2.0 wrote:
bobucles wrote:
Core count means nothing. It's limited by RAM latency which is limited by the speed of light and the distance between the CPU and RAM sticks on motherboards.
Patch notes 0.19:
- The speed of light was causing a lot of performance issues but we found a workaround to increase it 180%. :D
Only 180%? Man, the devs must be starting to get lazy.
:P
Light is slowed down by gravity and you can make your CPU only have so much lighter with helium cooling.
Or you can use quantum entanglement on the cpu and the ram to have no delay in the communication, and then have infinite speedup and not worry about optimations ever again... 8-)

Post Reply

Return to “General discussion”