Posting in behalf of infantryman4life.
Seemed like he had a slowdown while hovering over an item in the crafting window for the player. The drop seemed to be about 5-8 UPS, much less so on a seemingly light item such as iron pipe.
Notice the drop while hovers on the item to craft - https://clips.twitch.tv/SuaveSuaveDoveMcaT
The same thing was tested with an assembler instead of the player to craft the item and the UPS drop was barely noticeable.
Here's a snippet of it - https://clips.twitch.tv/BlueCarelessOkapiDogFace
Modlist - https://pastebin.com/k7m0eGD7
Any clue what's causing this?
Weird FPS/UPS decrease during item craft lookup
Re: Weird FPS/UPS decrease during item craft lookup
It's breaks down the item into raw materials, which means going though the recipes recursively till it reaches something that is flagged as raw material. It then shows which of those and the actual ingredients you have, which you can craft and which you lack.
The problem is iirc that it does this over and over to update in case you got some new materials from logistic bots or hand crafting. With the complex weave of recipes added by mods this becomes a performance drain.
The reason why an assembler doesn't have this problem is because you set the recipe and it doesn't go searching for what you have in you inventory. With furnaces you get a drop when it has to pick a recipe but that also is less of a problem because it isn't recursive. But it's noticeable for large recipe lists.
The problem is iirc that it does this over and over to update in case you got some new materials from logistic bots or hand crafting. With the complex weave of recipes added by mods this becomes a performance drain.
The reason why an assembler doesn't have this problem is because you set the recipe and it doesn't go searching for what you have in you inventory. With furnaces you get a drop when it has to pick a recipe but that also is less of a problem because it isn't recursive. But it's noticeable for large recipe lists.
Re: Weird FPS/UPS decrease during item craft lookup
That's why this mod exists. Even the in-game option to remove the raw ingredients display doesn't prevent this slowdown in many cases.
Re: Weird FPS/UPS decrease during item craft lookup
I'd recommend to use the recipe_step_limit utility constant to decrease the maximum amount of recursive steps that Factorio does to calculate raw recipe ingredients instead of setting allow_decomposition to false on all recipes. The default limit is 50k, you could reduce it to 10k or even lower. Recipes that do not resolve into raw ingredients within that step limit will display "too expensive to calculate" as the total raw.
The reason the in-game option doesn't work is that the calculation is also done to display "how many times can this be crafted from what you have in your inventory currently", which is not disabled by the option to hide the total raw.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
-
- Inserter
- Posts: 46
- Joined: Thu May 09, 2019 1:19 am
- Contact:
Re: Weird FPS/UPS decrease during item craft lookup
Where do I insert the recipe_step_limit at?Bilka wrote: ↑Mon Aug 10, 2020 12:20 pmI'd recommend to use the recipe_step_limit utility constant to decrease the maximum amount of recursive steps that Factorio does to calculate raw recipe ingredients instead of setting allow_decomposition to false on all recipes. The default limit is 50k, you could reduce it to 10k or even lower. Recipes that do not resolve into raw ingredients within that step limit will display "too expensive to calculate" as the total raw.
The reason the in-game option doesn't work is that the calculation is also done to display "how many times can this be crafted from what you have in your inventory currently", which is not disabled by the option to hide the total raw.
Re: Weird FPS/UPS decrease during item craft lookup
Code: Select all
data.raw["utility-constants"]["default"].recipe_step_limit = 10000
- Attachments
-
- foo_0.0.1.zip
- (610 Bytes) Downloaded 95 times
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
-
- Inserter
- Posts: 46
- Joined: Thu May 09, 2019 1:19 am
- Contact:
Re: Weird FPS/UPS decrease during item craft lookup
thank youBilka wrote: ↑Mon Aug 10, 2020 3:02 pmand pack it into a data.lua file and mod, or use the attached mod (licensed under Unlicense).Code: Select all
data.raw["utility-constants"]["default"].recipe_step_limit = 10000