Page 1 of 1

[2.0.24] Deconstructing lots of platform tiles at once is very slow

Posted: Wed Dec 11, 2024 5:44 am
by IsaacOscar
Consider the following pointless platform:
12-11-2024, 15-31-51.png
12-11-2024, 15-31-51.png (656.02 KiB) Viewed 92 times
It has a 2×100 column of platform tiles.

Now if I delete all the tiles using alt-d or ctrl-x (it doesn't matter which):
12-11-2024, 15-32-50.png
12-11-2024, 15-32-50.png (1.62 MiB) Viewed 92 times
The left half of the column, and the last tile on the bottom-right get instantly deleted, whilst the remaining tiles get marked with a red 'x':
12-11-2024, 15-33-56.png
12-11-2024, 15-33-56.png (622.67 KiB) Viewed 92 times
It then stays like that for 20 ticks. Untill finally, the bottom tiles is deleted. The next tile also takes 20 ticks to get deleted.

Now if instead of the above, I only deleted the bottom half of the column (100 instead of 200 tiles), I get the same behaviour, except it only takes 10 ticks to delete each tile.
12-11-2024, 15-39-18.png
12-11-2024, 15-39-18.png (1.78 MiB) Viewed 92 times
Halving that again (to 50 tiles) gives 5 ticks.
(Thus deleting platform tiles appears to be an O(n²) operation).

In other words, it is literally faster for the player to delete a bit of the platform, wait for it to finish, then delete more, then to rely on factorio to delete the whole thing in one operation.

Note that I had no FPS/UPS drop doing this.

Re: [2.0.24] Deconstructing lots of platform tiles at once is very slow

Posted: Wed Dec 11, 2024 9:59 am
by Rseding91
Thanks for the report however this is not a bug. Don’t build that huge stick if you don’t want a huge stick.

Re: [2.0.24] Deconstructing lots of platform tiles at once is very slow

Posted: Wed Dec 11, 2024 10:03 am
by IsaacOscar
Rseding91 wrote: Wed Dec 11, 2024 9:59 am Thanks for the report however this is not a bug. Don’t build that huge stick if you don’t want a huge stick.
Sure, but it's a really annoying performance issue that has make building actual platforms difficult (and not just this test case).
In fact, it's the only performance issue I've had playing space age.