Huge FPS drop when looking at the logs of a giant tree, TPS increase when breaking said logs.
Infestidos opened this issue · 4 comments
Forge 1.19.2 v0.18.4 & v0.18.5. Giant tree (A) vs Regions Unexplored Redwood (B) for spark profiling.
Breaking a SINGLE block in creative in the giant tree produces this spark profile: Tree A. Breaking an ENTIRE Redwood tree produces this spark profile Tree B. A shows noticeably larger numbers under the mods section.
Simply walking around inside the tree drops my FPS to as low as 3 if I'm looking at logs. The second I look at any other type of block the issue stops. Doesn't matter if I'm looking at the tip of a root, the middle of the tree, or a branch in the canopy.
Both trees using tool tip mods show a max log count of the default ~320. Disabling Chopping or removing this mod fixes the issue.
Yikes, some optimization code was actually running backwards, so tree detection (checking for leaves connected to the tree) was always giving worst-case performance (scan all the tree's logs) instead of best-case (scan just enough logs to find leaves). Even worse, this step wasn't respecting the max tree size setting. I'll try to get the patch up tonight, it should improve performance significantly.
Thanks for all the info! Treechop’s definitely misbehaving. I’ll get it fixed.