Towdium / JustEnoughCalculation

A simple minecraft mod help you calculate the cost for recipes
Other
54 stars 41 forks source link

Improve performance of Context::matches #141

Closed Fybe closed 1 year ago

Fybe commented 1 year ago

Look up matching items in the registry instead of searching linearly through ALL registered items. This speeds up CostList merging. Cost calculation now only takes milliseconds instead of seconds for complex recipes.

Fixes #99 and #126.

yzl210 commented 1 year ago

Thanks!

Gschmidt22 commented 11 months ago

Is there any chance of this fix being backported to older versions of the mod? This mod helps immensely with older expert packs but the freeze described in #99 can last up to 10 or 15 seconds when opening the calculator on more complex recipes.

Fybe commented 11 months ago

If you tell me which version of minecraft you are interested in, I can create a pull request for that specific version.

Otherwise, I would have to bombard this repo with PRs for each version branch. Ideally the commit should just be cherry picked into all the version branches, but doing so cannot be done without write permission afaik.

Gschmidt22 commented 11 months ago

I'm using Minecraft 1.12.2, running Enigmatica 2 Expert Skyblock currently with a mod version: 3.2.7 Thank you! I appreciate you taking the time.

Fybe commented 11 months ago

I think this should work.