Closed Krutoy242 closed 7 months ago
CraftTweaker
compat, disabling it will not allow you to use any of mod features
Strange. All other mods that have CraftTweaker compat doesn't require this amount of time to initialize.
Does RandomTweaker
using some kind of special mechanics to register compat?
I'm curious how much time crafttweaker.mc1120.CraftTweaker.onPreInitialization()
takes?
I'm curious how much time
crafttweaker.mc1120.CraftTweaker.onPreInitialization()
takes?
2.9 sec
So we move crt register stuff to zenutils. Then can you tell how much time zenutils preinit takes?
I will test it later. Write please what class and method should I search for?
youyihj.zenutils.ZenUtils.readSidedZenRegisters()
200ms https://spark.lucko.me/GU0xBk6eeB?hl=196627
This is not relevant to the problem, just my curiosity - what was it? Did RandomTweaker use some unusual methods that other mods don't use? Did it do any unnecessary calculations during initialization?
A zenclass should be registered when two mods are installed. For example, custom botania flowers should be enabled only contenttweaker and botania are installed. However, CraftTweaker API only allows to add a single mod dependency of zenclass. RandomTweaker has to add a special way to register these classes. Recently, ZenUtils added the same mechanism to implement it, so we migrated to zenutils. 2.9s -> 200ms, looks like RandomTweaker code is low performace.
Im profiled my
E2E-E
modpack and found that this function took 1.6 seconds to execute.https://spark.lucko.me/1gJaCkUPrm?hl=301592
This is small in comparison to whole modpack, but since i have ~400 mods, i want to be sure each second spent by any mod is improving modpack and not an accidental bug😅 1.6 seconds is concerning for a single mod, when 200 of 400 mods loads in less than 0.1 second.
What does this function do? If it required for some mod feature, how can i disable this feature?