Page 22 of 23
Re: Performance optimization - post your saves
Posted: Sun Nov 17, 2024 7:43 pm
by fwyrl
Seeing some significant lag when opening a space platform hub with enough cargo bays to hit the maximum inventory size of 65535 slots.
On my machine, the lag starts getting noticeable in an empty world around 30k slots, and bad around 50k.
Interestingly, it looks like this results in a larger FPS hit than UPS hit, as it's the only time I've seen my game with an FPS below my UPS on this hardware, and it's not a small margin - 8 FPS, 60 UPS.
Assuming this is not really considered a problem, and it doesn't have any effects if the inventory isn't open, but in case anyone else wanted a hauler that could move an entire planet, be forewarned - set your schedules before expanding storage to unreasonable degrees. Changing schedule at single digit FPS is painful.
Re: Performance optimization - post your saves
Posted: Thu Jan 09, 2025 8:15 am
by Sopel
save:
https://drive.google.com/file/d/14xGD7n ... sp=sharing, disregard mods, load as vanilla (file uploads on the forum still not working for me on firefox)
copied from discord
[07:47]Sopel:

- image1.png (18.86 KiB) Viewed 4207 times
[07:47]Sopel: I assume these checks are done every tick?
[07:47]Sopel: (this is from a ~90ms per tick save. main thread readings only)
[07:50]Sopel: the new logistic bot thingy also looks quite costly

- image2.png (26.04 KiB) Viewed 4207 times
[07:51]Sopel: most robots that I use are in throughput-limited and not latency-sensitve applications
[07:53]Sopel: love me some dynamic memory allocation taking like 2ms per tick

- image3.png (30.19 KiB) Viewed 4207 times
[07:56]Sopel: space platforms also produce a huge amount of particles, this is without my mod that disables them

- image4.png (14.12 KiB) Viewed 4207 times
[07:59]Sopel: and something that probably won't change but is nevertheless interesting. ref:
https://mulark.github.io/tests/test-000 ... 00061.html

- image5.png (19.86 KiB) Viewed 4207 times
[08:00]Sopel: most inserters in practice end up taking from belts, rather than putting on belts. belt->silo, belt->train
[08:08]Sopel: postTransferHook not that big of an issue in practice, but taking a lot of items out of the hub by robots is still very costly, and not due to robots themselves

- image6.png (26.17 KiB) Viewed 4207 times
[08:09]Sopel: that's everything worth noting that I can see now
[08:10]Sopel: oh, one more thing, these are still quite costly for what they do. and I believe update shadow was still doing something even when I removed it in prototypes (though here it's vanilla)

- image7.png (21.69 KiB) Viewed 4207 times
Re: Performance optimization - post your saves
Posted: Sat Jan 11, 2025 9:30 pm
by Blaster
Space Platforms get very slow to build constructions when they get big. Take a look at my Fusion Cube for what I mean.
Also, a blueprint is attached for Fusion Cube if you want to build one in a sandbox.
Re: Performance optimization - post your saves
Posted: Mon Jan 13, 2025 1:55 pm
by Rseding91
Blaster wrote: Sat Jan 11, 2025 9:30 pm
Space Platforms get very slow to build constructions when they get big. Take a look at my Fusion Cube for what I mean.
Also, a blueprint is attached for Fusion Cube if you want to build one in a sandbox.
I don't understand what you mean. What's "slow" about it? Is it lagging the game?
Re: Performance optimization - post your saves
Posted: Sat Feb 01, 2025 6:43 pm
by Blaster
Rseding91 wrote: Mon Jan 13, 2025 1:55 pm
Blaster wrote: Sat Jan 11, 2025 9:30 pm
Space Platforms get very slow to build constructions when they get big. Take a look at my Fusion Cube for what I mean.
Also, a blueprint is attached for Fusion Cube if you want to build one in a sandbox.
I don't understand what you mean. What's "slow" about it? Is it lagging the game?
The game's build system is very good at keeping itself from causing lag, but it itself gets reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeealy slow about it. I'm currently trying to make "build stages" for the Cube, and doing so, I'm cutting away large sections of the cube to make one of the intermediate stages. Removing the platforms takes several minutes per "column" of platform tiles in a roughly 100x100 square, with almost a minute of nothing happening followed by removing one column, then repeat. This is using the desconstruction planner.
The opposite is also true - when it gets big enough, placing buildings to construct on the Cube can take several seconds or longer before it responds by building it.
- Utopia Planitia.zip
- This is a world where you can see the lag in action. Go to the "Fusion Cube" space platform to see.
- (12.13 MiB) Downloaded 75 times
Re: Performance optimization - post your saves
Posted: Sat Feb 01, 2025 8:35 pm
by Muche
There are 18k space platform foundation tile deconstruction orders in your particular case. That's a lot of orders.
The algorithm that selects which platform tiles to deconstruct to make sure the platform is kept contiguous (despite
123811 Mines can create holes in space platform) looks to be biased - it takes 1 tick to deconstruct 3 tiles (marked green) on the left, and 8 ticks to deconstruct 1 tile on the right.

- 124199-PlatformDeconBiasWE_NS.jpg (94.37 KiB) Viewed 3606 times
Also see
124199 Deconstructing lots of platform tiles at once is very slow.
For comparison, building doesn't seem to show this bias - all adjacent tiles (albeit subject to some performace batching) start the construction animation:

- PlatformCon-WE_NS.jpg (36.2 KiB) Viewed 3606 times
Re: Performance optimization - post your saves
Posted: Thu Feb 13, 2025 10:43 pm
by luc
Rseding91 wrote: Mon Jan 13, 2025 1:55 pm
I don't understand what you mean. What's "slow" about it? Is it lagging the game?
Space platforms in general are slow for me. Game runs solid 60fps on any surface I think (we expanded to every planet now short of outer solar system edge, so it's not a small factory anymore either) but as soon as I open a space view it goes down to maybe 40 fps while I'm doing nothing. Doesn't matter if I zoom in or anything (that often helps in busy views). The laptop is not great so I don't expect it's still solid 60 if I have a big base in view, but an empty platform doing nothing? That's a bit weird
Not sure if you notice this sort of thing on the development hardware that is probably great to be able to work smoothly
Re: Performance optimization - post your saves
Posted: Thu Feb 13, 2025 11:55 pm
by Rseding91
luc wrote: Thu Feb 13, 2025 10:43 pm
Space platforms in general are slow for me. Game runs solid 60fps on any surface I think (we expanded to every planet now short of outer solar system edge, so it's not a small factory anymore either) but as soon as I open a space view it goes down to maybe 40 fps while I'm doing nothing. Doesn't matter if I zoom in or anything (that often helps in busy views). The laptop is not great so I don't expect it's still solid 60 if I have a big base in view, but an empty platform doing nothing? That's a bit weird
Not sure if you notice this sort of thing on the development hardware that is probably great to be able to work smoothly
Is it still slow in the latest experimental version? There were several improvements about exactly that in 2.0.34
Re: Performance optimization - post your saves
Posted: Fri Feb 14, 2025 12:47 am
by travvo
Hi Rseding, I was experiencing this recently as well (2.0.34). I was coming back from the shattered planet in a pretty big ship (
https://old.reddit.com/r/factorio/comme ... runner_at/) and I deconstructed some of my interior platform tiles to reduce weight and increase speed. In particular trying to remove tiles from bottom to top takes a long time, much faster to cancel deconstruction, deconstruct one tile wide to the top of the area and then deconstruct from the top down.
Here's a copy of my save where I've marked the same deconstruction on the ship (Neb Kheperu Ra) while it's parked in Nauvis orbit. My game is running steady at 60 FPS/UPS but tile removal takes a very long time.
Ty so much, 10 year player and huge fan
Re: Performance optimization - post your saves
Posted: Thu Feb 20, 2025 6:35 pm
by travvo
Hi Rseding, some follow-ups.
First, with regard to space platform deconstruction: I've been finding that once my ship is over a certain size, and I've taxed the deconstruction algorithm enough, it will stop working no matter how small I make my ship. Here I was reducing a ship that was thousands of tiles long, and by the end I had to click single tiles to remove them, otherwise the algorithm would hang forever:

- 20250217162802_1.jpg (450.22 KiB) Viewed 2980 times
If I tried to deconstruct a large block it would reduce down to a tree structure like you see here and go no further. I switched to using mines and biters to blow off the back 99% of ships after this because it was much easier.
Second: I fully acknowledge that I was doing stupid things to cause this. This seems like exactly the kind of behavior you are trying to identify in this thread.
I was trying to test the limits of getting a ship to the shattered planet using /editor, including invincibility/lab tiles/stacked thrusters. I did make it to the shattered planet already:

- 20250220082954_1.jpg (267.34 KiB) Viewed 2980 times
Again obviously stupid. Took me awhile for the asteroids to clear, and to get the platform back to Nauvis. It took a good 30 minutes for the solid band of deep-space asteroids to clear around the ship, but eventually they did. However, even when all asteroids were gone and the game was running at 60/60, the background asteroids were low res and moving at around 5 UPS, and the fog had long vertical bars. This persisted for minutes:

- 20250220092518_1.jpg (296.85 KiB) Viewed 2980 times
When I saved and reloaded it was immediately fixed:

- 20250220093429_1.jpg (362.33 KiB) Viewed 2980 times
Re: Performance optimization - post your saves
Posted: Fri Feb 21, 2025 3:56 pm
by luc
Rseding91 wrote: Thu Feb 13, 2025 11:55 pm
Is it still slow in the latest experimental version? There were several improvements about exactly that in 2.0.34
Thanks for the tip! It doesn't help though. I just tried a few things to narrow down the issue (TL;DR: the three bold parts):
- Launching a new platform and zooming in until the hub+platform fills the screen gets 52 fps
- Panning away (not changing zoom) until there are
no entities in view makes it a bit faster: 55 fps. Even one asteroid chunk makes it go back down to 52 fps
- The remove view on a planet does not have this, so
it's not remote view generally but the space view specifically (I get solid 60 fps when viewing a grass field on Nauvis)
-
A few entities aren't usually an issue either: viewing an outpost on Nauvis in remote view, I get ~59.5 fps
- (Viewing the main base zoomed out gets me 40 fps, but there's a lot of stuff happening so that makes sense to me)
- Local view on a planet (Aquilo): an empty view with just myself in it is 60 fps, and the small-ish base in (non-remote) view is ~58 fps, no problems with local view either
- Viewing a built-up space platform, not very big but also not empty, gets like 46 fps. No big hurdle to playing, until the save grows further at least, but just weird
If any of this is unexpected and thus worth making a bug report for (with time usage etc.), let me know. I'm assuming it would be wontfix "your computer is a potato and space is hard"

Re: Performance optimization - post your saves
Posted: Fri Feb 21, 2025 4:05 pm
by Rseding91
Please post a log file and a save file showing the FPS issue.
Re: Performance optimization - post your saves
Posted: Fri Feb 21, 2025 4:07 pm
by luc
Rseding91 wrote: Fri Feb 21, 2025 4:05 pm
Please post a log file and a save file showing the FPS issue.
Re: Performance optimization - post your saves
Posted: Fri Feb 21, 2025 4:12 pm
by Rseding91
You're running on a Intel(R) UHD 620 for a graphics card (an integrated GPU in the processor). Since you're playing on a laptop, there's nothing you can do to make that run faster. You'd need a new computer. For reference, my laptop's GPU vs the UHD 620:
https://www.videocardbenchmark.net/comp ... Laptop-GPU
Re: Performance optimization - post your saves
Posted: Fri Feb 21, 2025 4:16 pm
by luc
Right, thanks but I'm well aware that the computer isn't fast, hence me comparing it to the normal views that are all 60 fps unless there's a lot going on and the space view that always runs slow...
But if it's expected that space view is slower then all is good :thumbs_up:
Re: Performance optimization - post your saves
Posted: Fri Feb 21, 2025 4:19 pm
by Rseding91
Yes, it's expected that rendering on platforms is more demanding. The stars, dust, and background clouds all increase the rendering demand.
Re: Performance optimization - post your saves
Posted: Sat Mar 01, 2025 2:08 am
by erkki772
I got very heavy bot base. If that zip doesn't show, here's the link
https://drive.google.com/file/d/1crh52Y ... sp=sharing
You can summon 160k logistic bots by trashing every buffer chests content next to biolabs
Mods: lilys treenade, raiguard calculator and allowed modules
Re: Performance optimization - post your saves
Posted: Sat Mar 01, 2025 9:06 am
by posila
luc wrote: Fri Feb 21, 2025 4:16 pm
Right, thanks but I'm well aware that the computer isn't fast, hence me comparing it to the normal views that are all 60 fps unless there's a lot going on and the space view that always runs slow...
But if it's expected that space view is slower then all is good :thumbs_up:
I don't know if you did that already (we don't log these settings), but disabling "Show space dust" and possibly "Show fog" could boost your FPS of space platform scenes.
Re: Performance optimization - post your saves
Posted: Sat Mar 01, 2025 5:30 pm
by luc
posila wrote: Sat Mar 01, 2025 9:06 am
I don't know if you did that already (we don't log these settings), but disabling "Show space dust" and possibly "Show fog" could boost your FPS of space platform scenes.
Oh, thanks for making me double check that! I thought I had already set all the graphics options to be quite minimal but forgot I re-enabled some of them because e.g. Gleba really looks amazing with that ambience (on other planets, the graphics options don't make such a big ambience-feeling difference). Indeed, those two options are enabled and, without them, it's 60 fps now on an empty platform and 59 fps on a moving one. Very good indeed! My bad for thinking the team hadn't considered low-end systems as much when making space age (still very playable regardless though, I shouldn't complain)

. Both options seem to have a roughly equal performance impact btw, so I think I'll leave fog enabled because of Gleba but disable the space dust

Re: Performance optimization - post your saves
Posted: Wed Mar 12, 2025 9:47 pm
by erkki772
I found really huge game freezing. When on low power and having big robot grid and tons of construction orders, game can freeze up to 20 seconds
https://drive.google.com/file/d/1hvBMV- ... sp=sharing
Here's the save.
Mods : lily treenade - raiguard calculator - allowed modules