Skip to content

Use metadata directory instead of re-extracting every launch - #9

Merged
LexManos merged 2 commits into
MinecraftForge:masterfrom
PaintNinja:avoid-metadata-zip-reextraction
Aug 19, 2026
Merged

Use metadata directory instead of re-extracting every launch#9
LexManos merged 2 commits into
MinecraftForge:masterfrom
PaintNinja:avoid-metadata-zip-reextraction

Conversation

@PaintNinja

@PaintNinja PaintNinja commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This addresses the todo comment inside SlimeLauncher's main class. Needs the complimenting FG7 PR to work: MinecraftForge/ForgeGradle#1084

@LexManos

LexManos commented Aug 18, 2026

Copy link
Copy Markdown
Member

I think because both FG and FDP use this, and having to update both is a pain.
The better option would be to continue to support the input as a zip, but supporting a directory.
I am also not a fan of Gradle's zipTree as it extract EVERYTHING in the zip to disc twice while doing the extract for the specific files you want. So its rather slow.

But, I think the better way to address the TODO would just to skip extracting entirely. Instead just reading the file from the zip to memory using JsonData.minecraftVersion(InputStream)

I think the TODO itself, is just old, as the FG side doesn't extract the archive anymore.
I'm wrong on that

@PaintNinja

Copy link
Copy Markdown
Contributor Author

Answered in the FG PR, reiterating here for clarity if someone refers back to this: worst case it extracts twice on Gradle side on setup but then no longer has to re-extract on SlimeLauncher side every run after that, best case it doesn't have to extract at all because it's cached on Gradle side and SlimeLauncher's directly fed the extracted directory.

I've restored support for the metadata.zip path now

@LexManos
LexManos merged commit e49b85d into MinecraftForge:master Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants