Better Air Filtering

by JoeyDP

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

10 months ago
0.17 - 0.18

i [Implemented] Performance considerations

11 months ago

I had started to get problems with performance - it dropped from 60 UPS to ~48-49 when i started to add mk3 filters (currently 220 and counting up).

Attempt A - each filtering machine was next to assembler which recycled filter (feeding coal from belt). This setup unfortunately resulted with many 0.1 pollution updates.
I've modified your control.lua and changed function suctionUpdateChunk(chunkTo, dx, dy). There is if pollution > 0 then , I changed it into if pollution > 0.5 then
This gave me around 5 UPS per second. Nice, but not really big enough.

Few attempts on add some additional caching, etc (failed) i surrendered and just bumped INTERVAL from 20 to 40 (Thank you for making it so easy to do).
This bumped previous result from ~54 UPS to ~108 UPS, so with nice buffer for expansions (especially that I still need to at least double number of machines).


11 months ago

Thank you for the extensive tests.

I've updated the mod to 0.2.0 and included your optimizations (credit where credit is due -> Now you should be able to use the official version again and change the setting. This way you can also use the new 'features'. I'm afraid this update has made the mod slightly less OP by increasing the power consumption and adding a break chance to filter recycling.

Let me know if you have any other suggestions!

New response