Page 1 of 2

How can I reduce particle update

Posted: Sat Feb 01, 2025 4:05 am
by spiral_power
I'm creating a thread here because I didn't think it was an individual issue to write about in the technical help.

My save is much larger, UPS is down. Checking breakdown, I see that particle update is always 1 or more. Is there any good way to reduce particle update?

I assume that's a drawing system process, but what the heck are they calculating?
Note that range of artillery is long enough, so there should be no active enemies.

1.png
1.png (1.26 MiB) Viewed 1210 times

Re: How can I reduce particle update

Posted: Sat Feb 01, 2025 4:40 am
by R060
spiral_power wrote: Sat Feb 01, 2025 4:05 am I'm creating a thread here because I didn't think it was an individual issue to write about in the technical help.

My save is much larger, UPS is down. Checking breakdown, I see that particle update is always 1 or more. Is there any good way to reduce particle update?

I assume that's a drawing system process, but what the heck are they calculating?
Note that range of artillery is long enough, so there should be no active enemies.


1.png
You'd better off disabling space effects, they tank fps a lot.

Re: How can I reduce particle update

Posted: Sat Feb 01, 2025 5:08 am
by mmmPI
spiral_power wrote: Sat Feb 01, 2025 4:05 am Is there any good way to reduce particle update?

I assume that's a drawing system process, but what the heck are they calculating?
Note that range of artillery is long enough, so there should be no active enemies.
I remember there was a version of the game that was causing high usage of ressources like you show. It was a "bug" and was corrected though, but it had the effect of increaseing time required for particule calculation and it turned out the biggest responsible were the number of demolisher in Vulcanus.

I don't know if that is still the case today that demolisher ( in large numbers) could cause this. I know it was fixed for the scale at which i"m playing but when i see "particule update" again, i'm always thinking demolishers.

Re: How can I reduce particle update

Posted: Sat Feb 01, 2025 6:17 am
by spiral_power
R060 wrote: Sat Feb 01, 2025 4:40 am
spiral_power wrote: Sat Feb 01, 2025 4:05 am I'm creating a thread here because I didn't think it was an individual issue to write about in the technical help.

My save is much larger, UPS is down. Checking breakdown, I see that particle update is always 1 or more. Is there any good way to reduce particle update?

I assume that's a drawing system process, but what the heck are they calculating?
Note that range of artillery is long enough, so there should be no active enemies.


1.png
You'd better off disabling space effects, they tank fps a lot.
I have turned that option off, but there seems to be no change.
Particle update value is high even without displaying the platform in the first place.

1.png
1.png (87.18 KiB) Viewed 1160 times

Re: How can I reduce particle update

Posted: Sat Feb 01, 2025 6:22 am
by spiral_power
mmmPI wrote: Sat Feb 01, 2025 5:08 am
spiral_power wrote: Sat Feb 01, 2025 4:05 am Is there any good way to reduce particle update?

I assume that's a drawing system process, but what the heck are they calculating?
Note that range of artillery is long enough, so there should be no active enemies.
I remember there was a version of the game that was causing high usage of ressources like you show. It was a "bug" and was corrected though, but it had the effect of increaseing time required for particule calculation and it turned out the biggest responsible were the number of demolisher in Vulcanus.

I don't know if that is still the case today that demolisher ( in large numbers) could cause this. I know it was fixed for the scale at which i"m playing but when i see "particule update" again, i'm always thinking demolishers.
Interesting comment.
I wonder why the value is so high without showing demolishers.

Current Vulcanus.
1.png
1.png (776.43 KiB) Viewed 1156 times

Re: How can I reduce particle update

Posted: Sat Feb 01, 2025 6:00 pm
by Jap2.0
mmmPI wrote: Sat Feb 01, 2025 5:08 am
spiral_power wrote: Sat Feb 01, 2025 4:05 am Is there any good way to reduce particle update?

I assume that's a drawing system process, but what the heck are they calculating?
Note that range of artillery is long enough, so there should be no active enemies.
I remember there was a version of the game that was causing high usage of ressources like you show. It was a "bug" and was corrected though, but it had the effect of increaseing time required for particule calculation and it turned out the biggest responsible were the number of demolisher in Vulcanus.

I don't know if that is still the case today that demolisher ( in large numbers) could cause this. I know it was fixed for the scale at which i"m playing but when i see "particule update" again, i'm always thinking demolishers.
I don't recall that impacting particle time, but that was 120275, which was fixed in 2.0.33. (Granted, that's still experimental, so it may help a bit in this case if he's not on that channel.)

Re: How can I reduce particle update

Posted: Sat Feb 01, 2025 8:27 pm
by spiral_power
Jap2.0 wrote: Sat Feb 01, 2025 6:00 pm
mmmPI wrote: Sat Feb 01, 2025 5:08 am
spiral_power wrote: Sat Feb 01, 2025 4:05 am Is there any good way to reduce particle update?

I assume that's a drawing system process, but what the heck are they calculating?
Note that range of artillery is long enough, so there should be no active enemies.
I remember there was a version of the game that was causing high usage of ressources like you show. It was a "bug" and was corrected though, but it had the effect of increaseing time required for particule calculation and it turned out the biggest responsible were the number of demolisher in Vulcanus.

I don't know if that is still the case today that demolisher ( in large numbers) could cause this. I know it was fixed for the scale at which i"m playing but when i see "particule update" again, i'm always thinking demolishers.
I don't recall that impacting particle time, but that was 120275, which was fixed in 2.0.33. (Granted, that's still experimental, so it may help a bit in this case if he's not on that channel.)
Interesting report, I used the command to annihilate enemies in Vulcanus and there was no change in UPS. If the update does not improve this, I will raise another bug report.
before.png
before.png (815.61 KiB) Viewed 1076 times
after.png
after.png (816.86 KiB) Viewed 1076 times

Re: How can I reduce particle update

Posted: Sun Feb 02, 2025 1:36 am
by mmmPI
spiral_power wrote: Sat Feb 01, 2025 6:22 am I wonder why the value is so high without showing demolishers.
At the time it was a bug. There are also pathological cases, you have a very large map, but most of the demolisher in the middle are dead already, which is not the worst case. I dont know why demolisher generate particles, or if it's still the case.

Jap2.0 wrote: Sat Feb 01, 2025 6:00 pm I don't recall that impacting particle time, but that was 120275, which was fixed in 2.0.33. (Granted, that's still experimental, so it may help a bit in this case if he's not on that channel.)
I can't find where i reported it but it was another thing, what you link seem more recent. Although when reading the later post that even without demolisher the particles are still representing roughly the same amount of time, i suppose it would be those in space.

Re: How can I reduce particle update

Posted: Sun Feb 02, 2025 2:32 am
by Jap2.0
mmmPI wrote: Sun Feb 02, 2025 1:36 am
Jap2.0 wrote: Sat Feb 01, 2025 6:00 pm I don't recall that impacting particle time, but that was 120275, which was fixed in 2.0.33. (Granted, that's still experimental, so it may help a bit in this case if he's not on that channel.)
I can't find where i reported it but it was another thing, what you link seem more recent. Although when reading the later post that even without demolisher the particles are still representing roughly the same amount of time, i suppose it would be those in space.
Entirely possible, I don't see anything on the forum (other than this thread) for a search of "demolisher particle" though.
spiral_power wrote: Sat Feb 01, 2025 8:27 pm
Jap2.0 wrote: Sat Feb 01, 2025 6:00 pm I don't recall that impacting particle time, but that was 120275, which was fixed in 2.0.33. (Granted, that's still experimental, so it may help a bit in this case if he's not on that channel.)
Interesting report, I used the command to annihilate enemies in Vulcanus and there was no change in UPS. If the update does not improve this, I will raise another bug report.
That did reduce the time spent on demolishers (SegmentedUnit) by about 0.85ms/tick, but it doesn't look like they were a huge problem for you.

Re: How can I reduce particle update

Posted: Sun Feb 02, 2025 6:33 am
by spiral_power
Jap2.0 wrote: Sun Feb 02, 2025 2:32 am
spiral_power wrote: Sat Feb 01, 2025 8:27 pm
Jap2.0 wrote: Sat Feb 01, 2025 6:00 pm I don't recall that impacting particle time, but that was 120275, which was fixed in 2.0.33. (Granted, that's still experimental, so it may help a bit in this case if he's not on that channel.)
Interesting report, I used the command to annihilate enemies in Vulcanus and there was no change in UPS. If the update does not improve this, I will raise another bug report.
That did reduce the time spent on demolishers (SegmentedUnit) by about 0.85ms/tick, but it doesn't look like they were a huge problem for you.
Maybe the time decrease is because it's right after loading the game; if we compare before-after, the numbers are almost the same.

Re: How can I reduce particle update

Posted: Sun Feb 02, 2025 8:54 am
by mmmPI
Jap2.0 wrote: Sun Feb 02, 2025 2:32 am Entirely possible, I don't see anything on the forum (other than this thread) for a search of "demolisher particle" though.
I tried to search too but couldn't find it, nor in the discord, i do remember it lasted only during 1 version, and i posted screenshot of the time usage of the same savegame on the steam and non-steam version, one being a version newer than the other, but i didn't realized it was the demolisher until it was fixed. I "learned" from this that demolisher emited particles, although not as much usually as they did in that particular update.
Jap2.0 wrote: Sun Feb 02, 2025 2:32 am That did reduce the time spent on demolishers (SegmentedUnit) by about 0.85ms/tick, but it doesn't look like they were a huge problem for you.
I was expecting particle time to also be impacted too but it seem very underwhelming.

@OP Maybe the particle time can be best optimized by the shape of the ship, ( if the hypothesis that it comes from asteroids/space platform is correct ), then maybe an horizontal ship would be more efficient than a vertical one, as the asteroids seem to fade/disappear when the ship is past them. That would (maybe) make a situation where the only existing asteroid debris are those in front of the ship, and potentially usefull, and not long trails on each sides of debris simulated 'until they disappear' vs 'until they are collected'.

Re: How can I reduce particle update

Posted: Fri Feb 07, 2025 12:10 pm
by Atraps003
Pretty sure particles are part of game state so they are always simulated and cost cpu time even if their rendering is disabled in graphics settings. To truly get rid of particles you need a mod.

https://mods.factorio.com/mod/RemoveAsteroidParticles
https://mods.factorio.com/mod/RemoveWeaponParticles

Re: How can I reduce particle update

Posted: Mon Feb 17, 2025 4:30 am
by spiral_power
Atraps003 wrote: Fri Feb 07, 2025 12:10 pm Pretty sure particles are part of game state so they are always simulated and cost cpu time even if their rendering is disabled in graphics settings. To truly get rid of particles you need a mod.

https://mods.factorio.com/mod/RemoveAsteroidParticles
https://mods.factorio.com/mod/RemoveWeaponParticles
I have tried mods you referred to.
I understand that these mods only eliminate display and do not change the gameplay in any way.

no mods vs mods

Two were adjusted to make conditions as identical as possible.
Particle updates seem to have decreased by about 0.8 ms.
Overall update time seems to have decreased by about 2 ms.
540km-no-mod.png
540km-no-mod.png (2.48 MiB) Viewed 701 times
540km-mod.png
540km-mod.png (2.42 MiB) Viewed 701 times

Re: How can I reduce particle update

Posted: Mon Feb 17, 2025 4:50 am
by spiral_power
mmmPI wrote: Sun Feb 02, 2025 8:54 am
Jap2.0 wrote: Sun Feb 02, 2025 2:32 am Entirely possible, I don't see anything on the forum (other than this thread) for a search of "demolisher particle" though.
I tried to search too but couldn't find it, nor in the discord, i do remember it lasted only during 1 version, and i posted screenshot of the time usage of the same savegame on the steam and non-steam version, one being a version newer than the other, but i didn't realized it was the demolisher until it was fixed. I "learned" from this that demolisher emited particles, although not as much usually as they did in that particular update.
Jap2.0 wrote: Sun Feb 02, 2025 2:32 am That did reduce the time spent on demolishers (SegmentedUnit) by about 0.85ms/tick, but it doesn't look like they were a huge problem for you.
I was expecting particle time to also be impacted too but it seem very underwhelming.

@OP Maybe the particle time can be best optimized by the shape of the ship, ( if the hypothesis that it comes from asteroids/space platform is correct ), then maybe an horizontal ship would be more efficient than a vertical one, as the asteroids seem to fade/disappear when the ship is past them. That would (maybe) make a situation where the only existing asteroid debris are those in front of the ship, and potentially usefull, and not long trails on each sides of debris simulated 'until they disappear' vs 'until they are collected'.
As per my previous post, it seems that Particle updates were dominated by things related to the display of destroyed asteroids.
Be that as it may, it can also be imagined that asteroids staying in space for a longer period of time increases Asteroid time and lowers UPS.

My platform has an elongated vertical triangle. Compared to the long horizontal shape, I cannot decide which is more efficient overall.
My English is not good enough to discuss it here. I also feel that it is more in line with the developer's intentions if there is no completely correct answer.

My promethium platform:
screenshot-tick-449477841.png
screenshot-tick-449477841.png (5.7 MiB) Viewed 690 times

Re: How can I reduce particle update

Posted: Mon Feb 17, 2025 4:57 am
by spiral_power
Would RemoveParticles mods be a good idea to offer as an official option, but is there little demand for it?
Also, when switching screens, I would expect that the calculation is always done because there has to be an animation in the middle of the shattering process, but it would be nice to have an option to only show the animation of the shattered pieces after the screen has been switched.

Re: How can I reduce particle update

Posted: Mon Feb 17, 2025 5:11 am
by eugenekay
Width and Speed the biggest design factors affecting Asteroid generation rates - the narrower your ship, the less Asteroids will be spawned overall. The faster you travel, the more Asteroids per second that you will encounter.

I have found that Triangular ships leave the Asteroids “alive” for longer as they must travel farther to reach the Weapons / be destroyed / get run over by the Platform and Despawn. Square-nose ships with no “wings” or protrusions minimize the distance that Asteroids and Chunks can travel, so Turrets / Grabbers can deal with them sooner.

You can also just turn down the “Asteroid Generation Rate” in the Map Generation settings. This makes the Turrets’ job easier, but reduces the amount of resources available.

Re: How can I reduce particle update

Posted: Mon Feb 17, 2025 6:28 am
by spiral_power
eugenekay wrote: Mon Feb 17, 2025 5:11 am Width and Speed the biggest design factors affecting Asteroid generation rates - the narrower your ship, the less Asteroids will be spawned overall. The faster you travel, the more Asteroids per second that you will encounter.

I have found that Triangular ships leave the Asteroids “alive” for longer as they must travel farther to reach the Weapons / be destroyed / get run over by the Platform and Despawn. Square-nose ships with no “wings” or protrusions minimize the distance that Asteroids and Chunks can travel, so Turrets / Grabbers can deal with them sooner.

You can also just turn down the “Asteroid Generation Rate” in the Map Generation settings. This makes the Turrets’ job easier, but reduces the amount of resources available.
To create Promethium SP, we need to destroy a large amount of asteroids.
I don't think the design of my platform is bad as a way to mass-produce Promethium SP. Two platforms move at 500km/s and maintain an average of 33kspm.
1.png
1.png (1.11 MiB) Viewed 649 times

Re: How can I reduce particle update

Posted: Mon Feb 17, 2025 4:14 pm
by eugenekay
spiral_power wrote: Mon Feb 17, 2025 6:28 amTo create Promethium SP, we need to destroy a large amount of asteroids.
I don't think the design of my platform is bad as a way to mass-produce Promethium SP. Two platforms move at 500km/s and maintain an average of 33kspm.
1.png
It’s not about absolute Prodution Numbers; it’s about how much CPU time is required relative to the design of your ship. The Triangular or “Arrowhead” design means that Asteroids must travel allll the way from the Spawn point (at the leading edge of your ship) down to where the Turrets / Asteroid Collectors are located - a distance of several hundred tiles. If your ship had a “flat front” then the Asteroids would only travel about 50 Tiles before encountering a Turret / Grabber / Platform Body. Once the Chunks have been “run over” by the widest part of the Platform they Despawn and no longer impact performance.

If you are already loading Promethium chunks at the max rate allowed by your Grabbers / Belt Storage system, then there is no point in going that fast while in the Shattered Planet area. Slow your ship down until the bottleneck is Asteroid Generation - it will be more UPS-efficient at that speed (less machines working, less Fluid pumping, less Asteroids moving at once, etc).


You can visually see the density of Asteroids in front of the ship, compared to the relative emptiness at the Sides near the engines. Empty space takes less time to simulate :-)

Re: How can I reduce particle update

Posted: Mon Feb 17, 2025 5:42 pm
by mmmPI
spiral_power wrote: Mon Feb 17, 2025 4:50 am As per my previous post, it seems that Particle updates were dominated by things related to the display of destroyed asteroids.
Yes ! Demolisher seem ruled out.
spiral_power wrote: Mon Feb 17, 2025 4:50 am Be that as it may, it can also be imagined that asteroids staying in space for a longer period of time increases Asteroid time and lowers UPS.

My platform has an elongated vertical triangle. Compared to the long horizontal shape, I cannot decide which is more efficient overall.
My English is not good enough to discuss it here. I also feel that it is more in line with the developer's intentions if there is no completely correct answer.
I think the reasonning "asteroids staying in space for longer period of time increases asteroid time and lowers UPS" is correct.
I think that the long horizontal shape would be more UPS efficient but haven't run any precise test.

Similar reasonning than eugenekay. I made a picture :
massiveship-legend.jpg
massiveship-legend.jpg (1.87 MiB) Viewed 570 times

Re: How can I reduce particle update

Posted: Mon Feb 17, 2025 6:29 pm
by eugenekay
mmmPI wrote: Mon Feb 17, 2025 5:42 pmI think the reasonning "asteroids staying in space for longer period of time increases asteroid time and lowers UPS" is correct.
I think that the long horizontal shape would be more UPS efficient but haven't run any precise test.
Yes, exactly this! Asteroid & Chunk “alive distance” costs the most in terms of Performance.

I have run some very non-scientific tests in the Map Editor, assuming a constant platform Mass (10,000 Tons) and the same amount of Thrusters / engineering equipment using various shapes: Triangle, Right Triangle, Arrow, Tee, Cube, long Rectangle, wide Rectangle…. The top speed is limited by Drag (and thus, Width). More width and more speed means more Asteroids. More asteroids on-screen for longer is more CPU work. Reduce any of these factors to suit :-)