Accessories `RenderLayer` unreasonably laggy
sylv256 opened this issue ยท 2 comments
I've encountered an unacceptable lag spike while wearing specific collars and running around my booth.
Reproduction
Items worn:
- Elytra (+ Cape)
- Left Scarf (Custom)
- Right Scarf (Bisexual)
- Acolyte's Bindings (Necklace)
- Fox Guise (Caricature)
- Bigender Collar (Collar)
Where it happens: Around the Silicate booth from the divide between Barricade and Silicate's booths to the entrance of the Silicate horse test.
How to trigger: Run around those areas and find the spot that triggers it. I used F3 + 2 to more reliably verify that it was happening.
Workaround
I used an "inject head unconditional cancel" on AccessoriesRenderLayer#render which almost entirely negated the lag spike. The fact that I sometimes still lag down to 90 FPS makes me wonder if this isn't specific to Accessories though. The bug is somewhat reliably able to be triggered (although less exacerbated) in the same manner at the same positions even after disabling the RenderLayer. The workaround can be found here.
Profile
This was taken while I triggered the bug precisely as much as possible. https://spark.lucko.me/CXIpq9FHVP
Side note: Scarves are not part of any RenderLayer. You should already see this with your unconditional cancel. But if you do find a performance issue with the scarves, feel free to report over on my repo too.
I believe this is more of a issue where a draw call is happening inside Accessories when it should not but it is more blaming Accessories for long render times but more is just forcing rendering to occur outside of normal areas without much performance issues. Some changes to the renderer to adjust code and prevent this blaming