KirkMcDonald / kirkmcdonald.github.io

Simple web-based calculator for the game Factorio.
Apache License 2.0
547 stars 146 forks source link

Out of memory error while trying to build seablock recipes #91

Closed terite closed 6 years ago

terite commented 6 years ago

I loaded in seablock data to this calculator, but encounter out of memory errors in Chrome while in the simplex method.

The OOM seems to be related to BigInteger (either the object size or the garbage created). I encounter it pretty frequently while doing matrix manipulation in the simplex method.

KirkMcDonald commented 6 years ago

This bug report lacks details, so it is difficult to say with certainty what the problem is. However, I can make an educated guess.

The current algorithm for detecting which portions of the recipe graph require representation with a linear program is a hack that works for the vanilla graph, but which I fully expect to fail catastrophically with other, more complex recipe graphs. Replacing this algorithm is one of the major barriers to supporting Bob's Mods (see also #35), among other alternate recipe graphs.

These sorts of failures could potentially take many forms. What you describe sounds like some sort of infinite recursion, which continually multiplies some numbers together until it OOMs.

I am closing this issue. Seablock is not supported at this time, and loading its recipe graph into the calculator is not expected to work. This may change in the future, but the relevant efforts are already covered by #35.