Better Air Filtering

by JoeyDP

An overhaul of the air filtering mod by Schorty. Includes complex air filtering steps to remove pollution.

Content
2 years ago
0.17 - 1.1
9.68K
Environment

g [Question] too much UPS

2 years ago
(updated 2 years ago)

hello,

not sure if I did something wrong but the mod uses too much UPS.
config is default (interval is 20 so 3 per second)
https://i.imgur.com/RcNNemh.png

is the filtering check supposed to take that much UPS? I had the same map with air filtering mod (Schorty's) and UPS was normal.

I updated the interval to 60 and UPS got better but still it takes around 1.5-2 in debug. is this normal in a big map?

edit: another question, I cannot see air filter consumption in production stats. is this normal?

2 years ago

Hello Gungoreno,

You can expect better air filtering to be more UPS intensive than air filtering for sure. The latter uses a core mechanic of the Factorio engine to remove pollution (basically producing a negative amount), which is extremely efficient. Better air filtering actually does some computations in lua to perform the 'suction' and removal of pollution, which requires more time to run.

However, the update process is highly optimized such that it scales well with the amount of filtering machines. The main contributing factor is the size of the area they cover. In larger bases you can expect more compute time needed.

That is why you can also configure the interval of updates. Increasing this should give you enough margin to take the mod all the way to the end game. Here again a clever optimization is used to spread the required computations over different game ticks to prevent stutter and help the game run smooth again.

I hope this helps!
–JoeyDP

2 years ago

hi, thanks for quick answer.

as I posted above, air filter takes more UPS than entity update so I was wondering if I did something wrong. take below as observations. sure, from map to map and design to design it matters of course.

I am not really convinced actually because of various things
first of all here is the layout of my factory https://i.imgur.com/7r6J2HW.png

  • my map is a test sandbox map. there is nothing but a factory I am testing and it is not large as you can think. it is 405x370 tile only, yes measured.
  • map has no other pollution sources. since it is a test map. I am testing various things in the map anyway so it is empty, no tree, different tile etc.
  • pollution seems to be around 38k total and your filters take 36k per minute which is nice but in another real map I saw pollution over 100k so I suspect your mod shall take a lot more UPS. while I was testing your mod, I realized more air filter assembler I build, more UPS it takes
  • I cannot increase the interval beyond 120 which is also stopping me about testing different options. I set to 120 since it is maximum but still takes a lot (has spikes from time to time)

is there a special layout I should follow? like one in a chunk than line up?
anything else to improve UPS? would modules help instead of line up the filter assemblers? how should I setup the air filter machines?

2 years ago

You could try only placing them around your base and not inside of it. I also think UPS will be better if you place a lot of filters in one chunk and then none in the surrounding chunks in the radius. This way less chunks need to be updated. However, I haven't tested the actual impact of applying these principles, so they might not be worth the effort at all. Using the original air filtering mod will by far be your safest bet for UPS efficiency.

–Joey

2 years ago

I prefer your mod than the original one. of course it depends how this shall fare in a real map, but I shall start with your mod.
I managed to put 1 or 2 (depends on close by pollution sources) machines per chunk around the factory (I never wanted to put them inside factory anyway, due to logistics complexity) and set interval to 120 as start. it gave me good numbers for now.

thanks for your support.
I wish your machinery had blueprint support but not a big deal

New response