Page 9 of 21

Re: Performance optimization - post your saves

Posted: Mon Nov 13, 2017 10:17 am
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.

Re: Performance optimization - post your saves

Posted: Mon Nov 13, 2017 2:33 pm
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:

Re: Performance optimization - post your saves

Posted: Mon Nov 13, 2017 2:45 pm
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 :-)

Re: Performance optimization - post your saves

Posted: Mon Nov 13, 2017 6:21 pm
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.

Re: Performance optimization - post your saves

Posted: Mon Nov 13, 2017 6:27 pm
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.

Re: Performance optimization - post your saves

Posted: Tue Nov 14, 2017 5:19 pm
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? ;)

Re: Performance optimization - post your saves

Posted: Mon Nov 20, 2017 12:01 pm
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.

Re: Performance optimization - post your saves

Posted: Mon Nov 20, 2017 8:33 pm
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.

Re: Performance optimization - post your saves

Posted: Mon Nov 20, 2017 11:28 pm
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.

Re: Performance optimization - post your saves

Posted: Tue Nov 21, 2017 1:04 pm
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.

Re: Performance optimization - post your saves

Posted: Tue Nov 21, 2017 5:55 pm
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.

Re: Performance optimization - post your saves

Posted: Wed Nov 22, 2017 9:45 am
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

Re: Performance optimization - post your saves

Posted: Wed Nov 22, 2017 10:11 am
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.

Re: Performance optimization - post your saves

Posted: Wed Nov 22, 2017 11:13 am
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.

Re: Performance optimization - post your saves

Posted: Wed Nov 22, 2017 5:49 pm
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?

Re: Performance optimization - post your saves

Posted: Thu Nov 23, 2017 6:00 am
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?

Re: Performance optimization - post your saves

Posted: Wed Nov 29, 2017 7:17 pm
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

Re: Performance optimization - post your saves

Posted: Wed Nov 29, 2017 9:00 pm
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

Re: Performance optimization - post your saves

Posted: Thu Nov 30, 2017 11:07 am
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.

Re: Performance optimization - post your saves

Posted: Fri Dec 01, 2017 8:07 pm
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-)