Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Ingredient Scanning for better performance #676

Closed
BlayTheNinth opened this issue Dec 10, 2023 · 0 comments
Closed

Improve Ingredient Scanning for better performance #676

BlayTheNinth opened this issue Dec 10, 2023 · 0 comments
Labels
enhancement New features or improvements to existing features pending release This issue is fixed and will be released in the next version

Comments

@BlayTheNinth
Copy link
Member

Right now, the kitchen has to search its connected inventories for every recipe shown as well as every single crafting operation. This is a big waste because we already know that items are generally going to be in the same place or at least in the same general area. For example, a storage drawer holding wheat will most likely hold more wheat and thus should be preferred when searching for wheat the next time. A slot in a chest containing an apple will likely hold more apples, and if not, it's still more likely that there are more apples in this chest than in any other connected inventory.

Ideas so far:

  • This cache should live in memory only
  • Ensure a consistent order of providers available to the kitchen
  • For each ingredient scanned, remember the index of the provider (and optionally, slot)
  • When searching for this ingredient again, check the last known location first

Blocked by #673

@BlayTheNinth BlayTheNinth added enhancement New features or improvements to existing features needs discussion This may be considered in the future and I'm looking for more opinions blocked This issue is blocked by another issue labels Dec 10, 2023
@BlayTheNinth BlayTheNinth moved this to 📝 Planning in Issues Dec 12, 2023
@BlayTheNinth BlayTheNinth added pending release This issue is fixed and will be released in the next version and removed needs discussion This may be considered in the future and I'm looking for more opinions blocked This issue is blocked by another issue labels Jan 9, 2024
@BlayTheNinth BlayTheNinth moved this from 📝 Planning to 🚀 Pending Release in Issues Jan 9, 2024
BlayTheNinth added a commit that referenced this issue Jan 9, 2024
* wip: API rewrite, big refactor

* wip: API rewrite, big refactor

* wip: API rewrite, big refactor

* wip: API rewrite, big refactor

* wip: API rewrite, big refactor

* wip: API rewrite, big refactor

* wip: API rewrite, big refactor

* wip: API rewrite, big refactor

* wip: API rewrite, big refactor

* docs: new api

* wip: api refactor fixes

* wip: fix tags

* wip: fix tooltips

* wip: remove obsolete code

* wip: fix capability loader on forge

* wip: remove old leftover class

* feat: add cache of last found ingredient spots for massive performance improvements #676

* feat: allow excluding specific recipes or whole result item groups #649

* refactor: Remove obsolete data files

---------

Co-authored-by: BlayTheNinth <1933180+blay09@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from 🚀 Pending Release to 🎉 Done in Issues Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or improvements to existing features pending release This issue is fixed and will be released in the next version
Projects
Archived in project
Development

No branches or pull requests

1 participant