Crafting Combinator


Includes combinators that allow you to set or read the recipe of any crafting machine, get ingredients or products of a recipe and more!

Content
3 years ago
0.14 - 1.1
21.1K
Manufacturing

b game slows down .. enormous UPS Time

5 years ago

the crafting combinator needs an enormous UPS Time - 3.000 up to 5.000 all the time and is the reason for my game slow down
all other mods (more then 50) need near the same time together, not all the time

seems you have an infinite loop in the code?

my setup are quite simple and there is no big ongoing calculation needed.
input signal as 1 (as long the few hundred items need to produce) --> recipe combinator (find recipe)
--> decider combinator (for blacklisting recipes)
--> output1 to recipe combinator (find ingredients) --> arithmetic combinator *X number of machines (its just one time blinking after an chance - so think calculation is just made 1 times) --> filter inserter/filter miniloader
--> outout2 to crafting combinators (up to 6 in a row) with set recipes, read bottleneck, empts fluids (if needed), empty inserter hands

refresh rates:
crafting combinators 300
recipe combinator 60

used:
~80 crafting combinators
~30 recipe combinator

after deactivating read bottleneck & empty inserter hands at all crafting combinators, needed UPS time is still 1.500 to 2.500.

thanks

5 years ago

The mod is slow, that's unfortunately just a fact that I can't do a whole lot about. However, with those numbers, it should still be manageable. Here are two things that I know are pretty slow - maybe you can optimize your setup somehow...

One is having a lot of different signals on the inputs to the combinators. Since I have to loop through all of the signals every update to figure out the highest one, it can be slow, tho this should only be a problem if you have hundreds of different signals on the inputs to a lot of combinators.

The other thing is recipe combinators that find recipes or uses. These currently loop through all the recipes you have researched when the highest signal changes. This can be a lot of work when mods come into play - especially things like the various recycling mods and other things that generate a lot of extra recipes.

With that said, I've been considering generting a big-ass lookup table for the recipe combinators, so I don't actually have to do the "calculation" over and over. I'll have to see how well that'll work, but I think it should help quite a bit.

5 years ago

thanks for your answer.

i have just a few possible input signals per factory section. but they will change quite all few minutes.

a lookup table for caching would be indeed very helpful.
maybe a personal "matching-list" or "blacklist" for recipes too.

if you need further info or blueprint, just drop a note

5 years ago

Well, if you feel like it, you can send me your save to therustyknife13@gmail.com. Ideally include your zipped mods folder too. I'll have a look at it and see if I can find something there.

New response