
[FIXED] Minecrafts Loading Screen FREEZING issue. When you launch minecraft in general or with any modpack the loading screen generally freezes for a short duration making you think your game has crashed and it also pauses any animations or loading bar from moving as the application itself is frozen.
THE ISSUE:
In simple terms, the loading work was blocking the same thread that draws the loading screen resulting in minecraft working internally even though the animation for the loading screen remained frozen because the thread had no opportunity to draw another frame.
THE SOLUTION:
This mod reduces the freezing times in 3 ways:
1) I reduced the repeated font work. Instead of constantly checking which font supplies each character and retrieves its glyph information, I now preserve the font priority and appearence while using more efficient selection method and temporarily crache shared glyph information. For my own personal modpack I reduced the the lookups from 2.6 Million to only 260k.
2) Minecraft by default finishes loading tasks before doing the animation drawing again. This mod adds an 8ms budget between completed tasks allowing a frame before continueing the remaining queue (Not one really expensive task can still exceed the budget but like something is better than nothing xD)
3) Datapack and world generation registry preparation normally runs without regular drawing by default. This mod adds drawing checkpoints between completed peices of work which keeps the preparation screen animated at all times.
Performance Improvements
Measured in Tensura World of Monsters (My own personal modpack thats planned to be released later this year) on Minecraft 1.21.1 / NeoForge 21.1.250.
| Measurement | Before | After | Improvement |
|---|---|---|---|
| Longest startup freeze | 11.8 seconds | 3.5 seconds | ~70% shorter |
| Longest Create World freeze | 9.1 seconds | 0.45 seconds | ~95% shorter |
| Total startup time | 70.9 seconds | 74.4 seconds | No speedup established |
Total startup time varies between runs. These results show improved responsiveness.
Glyph Provider Lookup Reduction
| Measurement | Before final glyph cache | After final glyph cache | Reduction |
|---|---|---|---|
| Actual provider lookups | 26,018,239 | 260,864 | ~99% fewer |
25,757,375 repeated lookups were served from the cache.
The lookup comparison uses an earlier mod build before the final caching optimization, not the original unmodified Minecraft baseline.