Pattern left-click spreading in any inventory causes noticeable lag
necauqua opened this issue ยท 0 comments
Just a pattern item, unencoded, and a vanilla chest, right-click spreading (the one that does one item per slot) is totally fine, but left-click spreading (the one that splits items equally and does phantom rendering <- probable cause) actually lags the game.
Not like this is a huge deal but this is just weird and may hint at some pattern (rendering, I suppose) issue.
edit: observed in atm6 in a new world, just vanilla+RS does not have that, so maybe a number of recipes matters or something
I think it's related to pattern cache, it uses ItemStacks as keys, and they don't have equals/hashcode so it is essentially an IdentityHashMap (which is also never ever cleared it seems like).
edit2: yeah it looks like clientside often creates new itemstacks for rendering and the cache being an identity one keeps recalculating the same things, this is very visible when you open a big crafter interface filled full of patterns, full creative crafter causes freezes of up to a few seconds
PR is on the way