troelsbjerre / Bottleneck

Factorio mod that tell you which assemblers are starved of ingredients
Other
29 stars 21 forks source link

Small Perfomance Improvment #70

Closed Nexela closed 4 years ago

Nexela commented 4 years ago

Using a truthy dictionary is faster than a find iterator.

troelsbjerre commented 4 years ago

I get the following error:

Error while running event Bottleneck::on_configuration_changed Bottleneck/control.lua:141: bad argument #3 of 3 to 'find_entities_filtered' (string expected, got boolean) stack traceback: [C]: in function 'find_entities_filtered' Bottleneck/control.lua:141: in function 'rebuild_overlays' Bottleneck/control.lua:264: in function <Bottleneck/control.lua:247>

Nexela commented 4 years ago

Sorry I forgot to push the fix in on_init.