HT's TreeChop

HT's TreeChop

3M Downloads

Unnecessarily high FPS impact

someaddons opened this issue ยท 4 comments

commented

I've noticed that the check to see if the chop item shows up is taking up to 10% of fps, see the profiling below:
image
https://spark.lucko.me/TizH63iQQn

This was when not looking at a chopable block
I'd suggest to move the code to client tick to limit it to 20times a second instead of each frame, and maybe skip the check if the looked at block did not change

Forge 1.19.2

commented

Ok, 0.17.8a is posted. Thanks again for reporting this

commented

Hey, thanks for the profiler output, showed me exactly where the root of the problem was :) There already was a lot of caching with the chop indicator, but a very subtle Forge interaction was causing TreeChop to rebuild its items blacklist every frame. I've posted a new version (0.17.7), should reduce the chop indicator's idle performance impact by about 99.8%.

commented

Hold that thought, 0.17.8 is crashing, will fix tonight

commented

thanks for the quick fix :)