InvMove

InvMove

1M Downloads

Performance issue due to repeated file access

Luke100000 opened this issue ยท 2 comments

commented

While in inventory, rapid Files.exists() calls drops FPS to 3.

InvMove.onInputUpdate() calls allowMovementInScreen() calls InvMoveForgeClient$1.modidFromClass(), and from there it seems like an uncached resource/class lookup. Maybe wrap modidFromClass into a cache?

I marked the affected method: https://spark.lucko.me/xIkj5lSwQ7?hl=65

commented

Interesting, I've never seen that be a performance bottleneck but I'm not sure why I didn't have a cache anyway.
When https://github.com/PieKing1215/InvMove/actions/runs/4419216864 is done can you see if that fixes it?

commented

That was quick! Yes, no more FPS drops on a quick test run. Thanks!