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
On windows LoaderUtil.normalizePath takes a significant amount of time during minecraft launch, (8% overall, 17% just on the render thread)
This is because path.toRealPath(); on windows is a very strangled mess of calls, invoking many native methods dispatches, buffers , reconstructing and reparsing the entire file path (multiple times). Point is, it is a slow method.
This is not an issue generally, however KnotClassDelegate.getCodeSource calls it every time.
This results in it taking more time to resolve the file path than it does to load and define the class.
Attached are profile results of a minecraft launch to the main menu.
All threads:
Render thread only:
Patching KnotClassDelegate.getCodeSource to not normalize the file path (i.e. just return the non-normalized path) there was a noticeable decrease in launch time.
The text was updated successfully, but these errors were encountered:
One potential solution is to test the nonnormalized path inside getMetadata, if it is not in the cache, normalize it, check against cache (generate if miss)
It does mean that there are potentially multiple paths mapping to the same Metadata, however that should not cause any issues.
On windows LoaderUtil.normalizePath takes a significant amount of time during minecraft launch, (8% overall, 17% just on the render thread)
This is because
path.toRealPath();
on windows is a very strangled mess of calls, invoking many native methods dispatches, buffers , reconstructing and reparsing the entire file path (multiple times). Point is, it is a slow method.This is not an issue generally, however
KnotClassDelegate.getCodeSource
calls it every time.This results in it taking more time to resolve the file path than it does to load and define the class.
Attached are profile results of a minecraft launch to the main menu.
All threads:
Render thread only:
Patching
KnotClassDelegate.getCodeSource
to not normalize the file path (i.e. just return the non-normalized path) there was a noticeable decrease in launch time.The text was updated successfully, but these errors were encountered: