GTNewHorizons / NotEnoughItems

GNU Lesser General Public License v3.0
50 stars 67 forks source link

Adopt JEI search tree #480

Closed LasmGratel closed 3 weeks ago

LasmGratel commented 2 months ago

A build of this version of NEI can be found here

List of changed/added features:

Pros/Cons: + Almost instant searching + Configurable Search Modes and | splitable tokens for multiple searching + Less CPU Usage - Possible compatibility issue - Higher memory usage(approx. 180MB for a large-scale modpack and even higher when using NEch) - Super slow first-run item list build time - Increases mod size from 800KB to 2.4MB

Tested in latest GTNH and my own Reika modpack.

slprime commented 2 months ago

Does not work presets & subsets. players use both things

image

image

slprime commented 2 months ago

I'm not sure that for the sake of searching it's worth inflating the mod so much. It's worth finding a more elegant solution

LasmGratel commented 2 months ago

Yeah, maybe just leave it for a while

mitchej123 commented 2 months ago

I'm not sure that for the sake of searching it's worth inflating the mod so much. It's worth finding a more elegant solution

Depend on gtnhlib which ships fastutils instead of shadowing it here

Dream-Master commented 2 months ago

Let this pr open so we can look if we find a solution or can it close later.

slprime commented 2 months ago

I don’t know how to show this more correctly, but the new algorithm remove filter visually slower

Details:

  1. I use history so that the line is entered full and does not depend on the input speed
  2. Compared NEI from 2.6.0 and the implementation in this PR
  3. you need to compare the time between changing the text in the input and changing the panel on the right
  4. video speed 0.25
  5. gtnh version 2.6.0

https://github.com/GTNewHorizons/NotEnoughItems/assets/31038811/cd44c028-3269-496d-8468-dda8e1e22e85

https://github.com/GTNewHorizons/NotEnoughItems/assets/31038811/1137c29d-963c-4fed-9c5f-f985206665bc

slprime commented 2 months ago

I'm still not sure about the wisdom of these changes.

Configurable Search Modes and | splitable tokens for multiple searching

can be implemented in a much simpler way

Caedis commented 2 months ago

Have you taken a look at https://github.com/CleanroomMC/HadEnoughItems/tree/cleanroom/src/main/java/mezz/jei/search instead of base jei ?

slprime commented 2 months ago

I compared NEI from 2.6.0 and the implementation in this PR

Dream-Master commented 2 months ago

I set this to draft for now

Ethryan commented 3 weeks ago

Needs spotless

Dream-Master commented 3 weeks ago

i am on it

Dream-Master commented 3 weeks ago

SLPrime — Today at 5:12 PM this PR not need. if you approve https://github.com/GTNewHorizons/NotEnoughItems/pull/485 DreamMasterXXL — Today at 5:12 PM ah ok good to know. so i can close it ? SLPrime — Today at 5:13 PM yes