Speeds up the resource pack organizer screen
Go to file
Johannes Frohnmeyer 9ef0bd01f5
ci/woodpecker/push/jfmod Pipeline was successful Details
ci/woodpecker/tag/jfmod Pipeline was successful Details
Better synchronization
2023-06-28 13:39:21 +02:00
src Better synchronization 2023-06-28 13:39:21 +02:00
.gitignore Initial commit 2023-06-27 23:31:57 +02:00
.woodpecker.yml Initial commit 2023-06-27 23:31:57 +02:00
LICENSE Initial commit 2023-06-27 23:31:57 +02:00
README.md Better synchronization 2023-06-28 13:39:21 +02:00
build.gradle.kts Better synchronization 2023-06-28 13:39:21 +02:00
gradle.properties Set up publish 2023-06-27 23:42:53 +02:00
settings.gradle.kts Initial commit 2023-06-27 23:31:57 +02:00

README.md

In vanilla minecraft, the list of resource packs is refreshed by scanning all possible sources synchronously.

Generally, this is not a problem, but in the resource pack organizer screen, this scan is performed whenever it is resized and every twenty ticks.

If another mod (such as respackopts) hooks into the pack scan and increases its duration even slightly, this leads to major lag spikes and makes the screen near-unusable when using more than a few packs.

This mod fixes that issue by moving this computation to another thread and scheduling a scan task on those events instead, drastically improving perceived performance.

Since the vanilla code is designed for synchronous execution, this can cause issues like crashes in edge cases, but worked well enough in my testing.