Make classpath entries properly lazy#118
Draft
zml2008 wants to merge 1 commit intoMinecraftForge:masterfrom
Draft
Make classpath entries properly lazy#118zml2008 wants to merge 1 commit intoMinecraftForge:masterfrom
zml2008 wants to merge 1 commit intoMinecraftForge:masterfrom
Conversation
14dfaaa to
67c4552
Compare
This brings total time needed to decompile Minecraft 1.18.2 from ~38 seconds, to ~25 seconds on my machine. Decomplication can be quite easily performed with only 2GB of memory allocated to the JVM, when previously 4+GB was required. Add -jrt option to enable decompiling with classes from another JVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This primarily reduces the memory consumed by FF, now able to decompile one of the 1.18.2 snapshots with a minimum of 2GB of ram, rather than the 4+GB previously required.
There may be some performance improvements from this change as well, but the difference between this change and just #116 is pretty negligible, so it's not super useful for judging this PR.
I've also introduced a
-jrt <1|current|path>option, which allows reading JDK classes from a JEP220 java runtime image, or the legacyrt/lib/*.jarandlib/*.jarformat, to cover modern and pre-J9 runtimes. This means that users who want to decompile classes produced for a version of Java older than the one required for Forgeflower (now J17) can reference that runtime, without any attachment to what FF requires.There is no change to the decompiled output from this branch.
Currently, these changes are tacked into a patch at the end of the list -- once I gather up the motivation/initial review has happened, I'll move the lazy classpath patch earlier in the sequence, so later patches can make their changes taking advantage of the lazy classpath API. I'll leave it as a draft until then.