Mojang / LegacyLauncher

Hacky code to launch our old versions from the new launcher!
253 stars 109 forks source link

Add transformer timings #23

Closed Runemoro closed 6 years ago

Runemoro commented 6 years ago

Add a legacy.timings property to enable timings for IClassTransformers. The timings get added to the blackboard as an unmodifiable map named TransformerTimings between IClassTransformers and the total time taken by the class transformer.

This allows mods (such as Forge, FoamFix, VanillaFix, and other optimization mods) to identify which transformers are slowing down class loading, which would not be possible detect using regular profiling only.

jamierocks commented 6 years ago

I think you may have strayed slightly from the original intention of this pr, Java 9 support isn't going to get merged. As for the removal of the vanilla tweakers, that's something else that is going to prevent this getting merged. Transformed class caching should be the topic of another pr. Also you may want to propose this functionality on cpw's new launching system that Forge (and likely most if not all other mod loaders) will be using in 1.13.

Runemoro commented 6 years ago

@jamierocks Forgot to close this PR. Obviously no one is looking at this repo anymore, so I decided to improve LauncherWrapper and replace it in the profile json from within my mod (VanillaFix) instead.