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 Multiblock Scanning for better performance #675

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

Improve Multiblock Scanning for better performance #675

BlayTheNinth opened this issue Dec 10, 2023 · 0 comments
Labels
enhancement New features or improvements to existing features needs discussion This may be considered in the future and I'm looking for more opinions

Comments

@BlayTheNinth
Copy link
Member

Right now, the kitchen has to check its surrounding blocks whenever the cooking table is opened, which can cause a lagspike on large setups (e.g. many kitchen floors or storage drawers).

Idea so far:

  • The multiblock should remain in memory and not be persisted, to avoid external edits or other factors resulting in an inconsistent state
  • Cooking Table should scan its surroundings upon load, spread out across ticks to avoid spiking
  • If the Cooking Table is opened before it has completed scanning, force it to complete in a single tick (this would still result in an initial lagspike but should be extremely rare)
  • Track which chunks are involved in the multiblock, and invalidate it if any changes are made to those chunks (at which point we repeat from above)
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 needs discussion This may be considered in the future and I'm looking for more opinions
Projects
Status: 📝 Planning
Development

No branches or pull requests

1 participant