You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve runtime of ModuleClassLoader constructor (#48)
In old startup profiles from 1.19/1.20, `ModuleClassLoader` often takes
at least a second or two to be constructed in large modpacks. This
likely boils down to the high amounts of iteration being done over the
module list - in particular, constructing `parentLoaders` would have
O(n^2) runtime in a scenario where every module reads the other modules.
This PR makes some changes to the constructor to avoid redundant
iteration. I have not profiled the changes, but I don't see a reason why
they could be slower than the status quo. In particular, the
`parentLoaders` loop has been heavily optimized to cache data for each
module, which should provide noticeable speedup to the automatic module
case.
0 commit comments