Minepacks

Minepacks

2M Downloads

Loading Item name language file freezes server startup

TheNety opened this issue · 2 comments

commented

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?

commented

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.

commented

With that build, it's done in less than 1 second, wow! Thank you very much. Also realised it's not somehow big issue anyway, I shouldn't be so much perfectionist lol. Appreciate it!