Kneelawk/WiredRedstone

[1.18.2] Tick Acceleration Assembler Lag

Closed this issue · 3 comments

Here we go again! :)

Tick accelerating assembler block in crafting table mode cause huge lag (spark log)
In Redstone Assembler mode there is no lag.

I see bclib calls that causes the lag. Not sure if its pure bclib's issue or you also do something.

Update:
Clean setup with WR and bclib only (almost) have no lag. So if it is correct to tick getCraftingRecipe() then problem should be in ticking huge crafting recipes list.

Update 2:
Definitely reducing available recipes reduces lag (spark log).
40 fueled Assemblers generates same lag as bottle. So ticking getCraftingRecipe() is definitely a bad idea. If it helps there is Auto Workstations mod that allows crafting table's recipes without lag (GitLab)

It feels like I spent so much time trying to optimize wires that I forgot to optimize the machine that makes them.

Theoretically this shouldn't be too hard to fix. I just need to cache the currently selected recipe, then clear the cached recipe when the crafting grid items change.

Ok, it looks like you don't even need BCLib to run into this issue.

Edit: BCLib actualy seems to be slightly improving crafting lookup times.

Ok, this is fixed in versions v0.3.7+1.18.2 and v0.4.8+1.19 on Modrinth and CurseForge.