Page 1 of 1

[0.16.50] Game hanging when calculating Total row in recipe

Posted: Wed Jul 04, 2018 6:49 pm
by _npo6ka_
I play the factorio modpak seablock pack 0.2.11. I'm also developing a mod. When developing, I ran into the following problem: when I use the "choose-elem-button" for recipes (elem_type = "recipe"), the game freezes for 1-2 seconds when you hover over the "choose-elem-button" when the recipe is complex. For example a rocket silo recipe.
IMG
When I point the cursor at it the game freezes for 2 seconds. Maybe it's worth it to revise the display option tooltip for choose-elem-button.

Re: Game hanging when calculating Total row in recipe tooltip

Posted: Wed Jul 04, 2018 7:01 pm
by _npo6ka_
To reproduce the error, you can use the old version of FNEI installed in the seablock pack.
Steps:
1) Open FNEI (ctrl + E)
2) Choose rocket silo
img
3) Click the "craft" button
img
4) Hover the "elem-choose-button" with the rocket silo recipe in the upper left corner
img

Re: [0.16.50] Game hanging when calculating Total row in recipe

Posted: Mon Aug 13, 2018 1:33 am
by Rseding91
Thanks for the report however that's working correctly. Simply you've got a set of mods that produces a "total" of crazy amounts of items/fluids and it takes quite some time to do the calculation of "how much of what does it take".

You've gone beyond what can the current system can reasonably handle and will have to cut back on some of the recipes if you want it to perform better.

Re: [0.16.50] Game hanging when calculating Total row in recipe

Posted: Mon Aug 13, 2018 4:26 am
by eradicator
Rseding91 wrote:Thanks for the report however that's working correctly. Simply you've got a set of mods that produces a "total" of crazy amounts of items/fluids and it takes quite some time to do the calculation of "how much of what does it take".
Can't you memoize the function that calculates the "total raw" numbers? You'd have to (at least partially) throw away the cached data when new recipies are unlocked...meh. But given how often these numbers are shown during gameplay it seems like they shouldn't be recalculated every single time the mouse is moved.