![]() ![]() I can’t be sure why, but my guess is that it has a simpler profile (it’s basically unsandboxed…) so the policy might be simpler to check. Secondly, I found that xip consistently spent less time in Sandbox evaluation. Filesystem operations might spend up to 30% of their time on CPU just evaluating sandbox policies! And all of these run synchronously on that one thread, so they block everything else from proceeding. ![]() How expensive is this evaluation? Pretty expensive, it turns out. ![]() The “driver” thread is unable to create files fast enough to keep the worker thread pool busy doing actual work on the CPU, because it’s blocked by file operations in the kernel. Specifically, it’s the creation of those half a million files that really hurts overall performance. The compression is handled by AppleFSCompression, and it’s more than happy to parallelize the task. They both call into the Bom API, so I profiled both to see why there’s a difference.Īnyways, the decompression process for a XIP is fairly straightforward: read files out from the XIP’s LZMA stream, recompress them with LZFSE if possible, then write them to disk. It’s at least 25% faster–sometimes even twice as fast, depending on the circumstances. Tip: when expanding an Xcode XIP archive, use the command line (xip -expand) rather than Archive Utility. Pro tip: if you downloaded Xcode straight from Apple, you can use xip -x Xcode_12.1_GM_seed.xip to skip the validation step and save approximately a billion tons of CO². You will see a significant download speed improvement. This script downloads the given Xcode by URL from the Apple Developer Portal, but uses up to 16 separate connections to do so. ![]() Download from the Mac App Store is incredibly slow and sometimes not even available for days after release (like 11.2.1).ĭownloading Xcode from the Apple Developer Portal is faster than using the Mac App Store, but it can be made even better. You cannot use the Mac App Store to install multiple version of Xcode at the same time if you need them, like when testing with a Xcode beta for an upcoming iOS release. Installing Xcode from the Mac App Store might seem like a convenient way to do so but it is too slow and inflexible. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |