Occultism

Occultism

19M Downloads

[1.20.1] FPS lag when using tooltip search in storage

jinkhya opened this issue ยท 6 comments

commented

Describe the bug
FPS lag when using tag tooltip search in storage.

To Reproduce
Steps to reproduce the behavior:
Not really sure how to reproduce it. I tried in an instance with just occultism and dependencies and since there's nothing in the actuator it doesn't happen. Maybe it's when there's a certain amount of items with different tags tooltips?
I don't have much yet in my world, this is in atm9 and I only have 895 slots used as you'll see in the video below.

Expected behavior
To not have fps lag when searching tags tooltips.

Screenshots
You'll see the fps drop in left corner. I go from 150 to 16.
https://streamable.com/rmfdse

System (please complete the following information):

  • Occultism Version: 1.96.0
  • OS: [e.g. Windows] Linux
  • Minecraft Version: 1.20.1
  • Modpack Link and Version, or list of mods: ATM9 0.2.34

Additional context
Add any other context about the problem here.

commented

does it lag if you do a normal search or any of the other modes?
Your search mode is by the way for tooltips (tags is $ ).

It is possible that the lag is due to MC having to collect all tooltips for all stacks, which is processing heavy because tooltips are not cached in mc, and an event is fired for each tooltip in forge. I am not sure if that can be optimized a lot (possibly I could cache tooltips to only re-fire the search after a minimum amount of time has elapsed, but I would have to investigate further).

As a starting point it would be good to figure out if other modes have the same problem :)

commented

Right, yeah it's tooltip not tag sorry lol.

It doesn't lag when I do normal search or tag with $, I don't remember all of them, but so far # is the only one doing it.

I attached RS on occultism storage and it's not doing it with or without special character searches.

commented

Thank you! Actually it should pop up on curseforge in a few minutes, but you can also access the jar here: https://github.com/klikli-dev/occultism/releases/tag/release%2Fv1.20.1-1.98.0 to test :)

commented

Thank you, that is great data!
Going to be a bit hard to test in dev without all the items available, but I have an idea on how to cache search results a bit better.
I will release a patch for that which will close this issue, if the issue remains after please ping me so I can reopen and try further steps

commented

sounds good ty so much :D if you want me to test a jar before releasing that's also possible. You can send it to me on discord (my name is also jinkhya)

commented

It works ! fps are very smooth now, thank you again !