Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add experimental unxip flag #187

Merged
merged 5 commits into from
Mar 8, 2022
Merged

Conversation

jpsim
Copy link
Contributor

@jpsim jpsim commented Mar 3, 2022

This mirrors this change in Xcodes.app: XcodesOrg/XcodesApp#179

In my tests (M1 Max, 64GB RAM), unxipping is 3x faster than /usr/bin/xip. I measured unxipping Xcode 13.3 beta 3 twice with the flag on (~100s) and off (~300s).

To use this, you need to be running macOS 11 or later, and pass the --experimental-unxip flag to an xcodes install command.

E.g.

xcodes install --latest --experimental-unxip

jpsim added 3 commits March 2, 2022 21:26
Source: https://github.com/saagarjha/unxip

This mirrors this change in Xcodes.app:
XcodesOrg/XcodesApp#179

In my tests (M1 Max, 64GB RAM), unxipping is 3x faster than
`/usr/bin/xip`.
@jpsim jpsim requested a review from a team as a code owner March 3, 2022 02:36
@jpsim
Copy link
Contributor Author

jpsim commented Mar 3, 2022

Based on my layman's understanding of the LGPL license, I believe this usage complies with its requirements that any modifications to the source file be made available under the same license, but I am not a lawyer.

@@ -90,6 +90,34 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xcode added this automatically

Copy link
Contributor

@MattKiazyk MattKiazyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super appreciative @jpsim!

Just some picky log additions to help indicate which side of the unxip world they are in!

Thanks again!

Current.logging.log(InstallationStep.unarchiving.description)

if experimentalUnxip, #available(macOS 11, *) {
return Promise { seal in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#picky
Can we add another log statement here indicating they're in experiment mode. something like

Current.logging.log("Using experimental unxip! If any issues, remove flag and try again")

}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And similar to inside experiment - can we indicate to try the experiment
Current.logging.log("Using regular unxip - try passing in --expermiental-unxip to try a faster unxip process.")

Co-authored-by: Matt Kiazyk <mattkiazyk@gmail.com>
@jpsim jpsim requested a review from MattKiazyk March 8, 2022 17:19
@MattKiazyk MattKiazyk added the enhancement New feature or request label Mar 8, 2022
@MattKiazyk MattKiazyk merged commit adb9b64 into XcodesOrg:main Mar 8, 2022
@jpsim jpsim deleted the experimental-unxip branch March 8, 2022 21:01
@jpsim
Copy link
Contributor Author

jpsim commented Mar 8, 2022

By the way, CI never ran on this PR because this repo has CI configured to require maintainer approval for PRs from first-time contributors.

@MattKiazyk
Copy link
Contributor

yeah.. pretty sure it's broken at the moment, so I just merged it in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants