Loading Item name language file freezes server startup
TheNety opened this issue · 2 comments
Information
Environment information
Plugin + server version info:
[18:05:34 INFO]: ##### Start Minepacks version info #####
[18:05:34 INFO]: Minepacks: 2.4.3-Release
[18:05:34 INFO]: Server: git-Purpur-"9a7a4dc" (MC: 1.17.1)
[18:05:34 INFO]: Java: 16.0.2
[18:05:34 INFO]: ##### End Minepacks version info #####
Online mode: no
BungeeCord: no
Server/crash log
[13:47:42] [Server thread/INFO]: [Minepacks] Enabling Minepacks v2.4.3-Release
[13:47:42] [Server thread/INFO]: [Minepacks] Starting Minepacks in standalone mode!
[13:47:42] [Server thread/INFO]: [Minepacks] �[32mConfig file successfully loaded.�[0m
[13:47:42] [Server thread/INFO]: [Minepacks] �[32mLanguage file successfully loaded. Language: english Author: GeorgH93�[0m
[13:47:42] [Server thread/INFO]: [at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.HikariDataSource] Minepacks-Connection-Pool - Starting...
[13:47:42] [Server thread/INFO]: [at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.HikariDataSource] Minepacks-Connection-Pool - Start completed.
[13:47:54] [Server thread/INFO]: [Minepacks] �[32mItem name language file successfully loaded. Language: english Author: GeorgH93�[0m
[13:47:54] [Server thread/INFO]: [Minepacks] Loading item translations ...
[13:47:54] [Server thread/INFO]: [Minepacks] Finished loading item translations for 828 items.
[13:47:54] [Server thread/INFO]: [Minepacks] �[32m Minepacks has been enabled! �[33m :) �[0m
Details
Description
As you can see in the log, loading of the Minepacks plugin (probably Item name language file) freezes the whole server startup for over 10 seconds. Would it maybe be possible to do it async or something so it doesn't block the main thread?
It's probably initializing the caches.
It only takes about 2 seconds on my system, so I ignored it.
Please try if this build improves it for you to an acceptable time.