Folia Core: Add Global Scoreboard API, Region Health Manager, and 1.2…#451
Closed
ghost wants to merge 1 commit into
Closed
Folia Core: Add Global Scoreboard API, Region Health Manager, and 1.2…#451ghost wants to merge 1 commit into
ghost wants to merge 1 commit into
Conversation
Contributor
|
You should not submit multiple features in a single PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This Pull Request introduces major architectural improvements and essential API additions tailored specifically for Folia's regionised multithreading environment. It addresses long-standing issues like global scoreboard synchronization and per-region performance stabilization.
Key Changes
GlobalScoreboardManagerto provide a thread-safe way to interact with the global scoreboard from any region using theGlobalRegionScheduler.RegionHealthManagerto monitor per-region performance (MSPPT) and provide hooks for dynamic load mitigation.FoliaPerformanceOptimizerwhich automatically throttles non-player entity AI/Physics in specific regions when they fall below performance thresholds (45ms+ MSPPT), ensuring stable 20 TPS.Creaking,CreakingHeart, andBreezeAPI extensions to Folia with full thread-safety and region-awareness.Rationale
Folia's unique architecture requires specialized tools for performance management and cross-region data synchronization. By providing a native way to handle scoreboards and regional lag spikes, we empower developers to build more complex and stable experiences on Folia without resorting to unsafe workarounds.
All implementations strictly adhere to Folia's threading model, ensuring no data corruption or cross-region access violations.