Overblog Tous les blogs Top blogs Célébrités Tous les blogs Célébrités
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU
http://lwis.over-blog.com/

lwis.over-blog.com/

Publicité

Macbook Xcode Performance



The latest version of Xcode, 10.1 (as of 30 October 2018) is - of course! - compatible with macOS 10.14.x 'Mojave', and the bare minimum amount of RAM it requires is exceeded by the standard 8 GB RAM on the new MacBook Air. ‎Xcode includes everything developers need to create great applications for Mac, iPhone, iPad, Apple TV, and Apple Watch. Xcode provides developers a unified workflow for user interface design, coding, testing, and debugging. The Xcode IDE combined with the Swift programming language make developing.

Apple equips the entry-level SKU of the MacBook Air with a dual-core processor, but is the performance still sufficient in 2020? Or should you get a configuration with a quad-core CPU? A tweaked keyboard and the option for a 10th Generation Intel 'Ice Lake' CPU bring typing comfort and better performance to Apple's already-excellent 13-inch MacBook Pro. Apple MacBook Pro 13-Inch. I've recently tried to use Xcode 8 to make iOS apps and to test things in Swift however it is impossible to work on as doing a simple 'print('Hello World')' takes easily over a minute to process to print it to the console, I tried doing regular development as well by creating UI buttons etc. But when I try to compile it, it is too slow to work and that is with simple things.

9 Tweaks to Speed up Xcode Builds

As projects grow, build times can become problematic. However, there are several tweaks you can make to Xcode that can decrease the amount of time it takes for builds to complete without any extra work.

UPDATE: This article has been expanded to add two factors to think about when speeding up VMs. In addition, this article references Xcode 9. With reports that Xcode 11 builds are up to 50% slower, Xcode build speed has become an even hotter topic.

Increase the thread count:
By default, Xcode typically uses the same number of threads as the number of cores in the machine's CPU. However, you can dramatically reduce build times – in some instances by a full 30% - by increasing the thread count beyond the default. This takes advantage of some processors' ability to multi-thread or simulate additional cores. Keep in mind that you may need to experiment to determine if there are diminishing returns for parallelized builds with your code base, and then adjust the thread count accordingly.

Enable the New Build System:
Apple's 'New Build System' is written completely in Swift and was designed for overall performance and dependency management improvements. Be aware that while the New Build System is available in Xcode 9+, it must be enabled in Xcode under Project/Workplace Settings since 'Standard Build' will be the default option. Alternatively, the New Build System can be enabled via command line (details linked below).

You can find more details and instructions for enabling the New Build System here:
Xcode New Build System for Speedy Swift Builds

Tweak the iOS simulator:
Visual studio mac azure devops. The Apple iOS test simulator lets you test across different software and hardware combinations (but only from a Mac). By using Physical Size or Pixel Accurate window sizes, you can reduce both the size of your tests and the time it takes for them to complete. Apple magic keyboard 2 compatibility. These configuration changes use less resources and help prevent tests from slowing down simulating pixels that no one will ever see.

You can find configuration instructions here: Adjusting the Xcode iPhone simulator scale and size

Use parallelized builds:
Parallelized builds can reduce total Xcode build times by building components of the app that do not depend on each other at the same time. For projects with many smaller dependencies that can easily be run in parallel, this can offer significant time savings. Gains will obviously depend on how your code is written, but it is worth testing since parallelized builds aren't enabled by default. You can enable parallel builds by editing the Xcode Scheme and checking ‘Parallel Builds' in the build action of the scheme.

You can find more detail on leveraging parallelized builds here: When should I check 'Parallelize Build' for an Xcode scheme?

Turn on build time summary:
Build time summary enables reporting on the build times of each piece of the Xcode build. In other words, build time summary can help you identify the parts of the build that are impacting build times and further optimize the build order for overall gains. While not a fix in and of itself, the insights that build time summary provides can be useful in prioritizing efforts when trying to optimize your build times.

Bigger build machines:
This one isn't technically an Xcode tweak, but bigger build machines do have an outsized impact when attempting to speed up builds. More computing power simply translates into faster completion of processes and builds. Our testing shows that moving from a dual-core Mac mini to a 12-core Mac Pro can give a 3x speedup without any additional effort. When you're ready to upgrade or scale your Mac infrastructure, feel free to contact us at MacStadium.

UPDATE - Increase your clock speed:

With the recent Xcode 11 release, more and more builds are showing signs of single-threaded-like behavior. That is, some elements are not being run in parallel like before. In this event, hardware with more cores is not necessarily better. MacStadium is currently finding customers can complete builds faster by picking a 6-core 2013 Mac Pro, which has a 3.5 GHz clock speed over the 12-core 2013 Mac Pro at 2.7 GHz. Individual builds vary, but this a factor to check.

UPDATE - Enable caching:

Xcode now supports caching automatically as long as users do not run the Product > Clean feature before builds. This is a great improvement for local developers who are the primary audience for Apple's continued development. For teams, the caching features of Bazel make it a very attractive choice. The implementation of Bazel is not always easy, but implementing Bazel for iOS and macOS builds was the specific focus of the 2019 BazelCon. All the talks are now on YouTube.

Xcode Macbook Air

If you're running dozens or hundreds of builds a day as part of a CI pipeline, you can improve performance by leveraging a virtualized Mac fleet. Orka, the first and only solution built for orchestrating genuine Apple hardware allows you to orchestrate many build machines using Kubernetes technology.

You can try an Orka sandbox and see for yourself how easy it is to manage a Jenkins pipeline, spin-up VMs and achieve near bare metal speeds on a hypervisor built specifically for macOS and iOS app development. Have questions? Talk to a sales engineer about how Orka can transform your Xcode build process.

Additional Resources:
Of course, these are only a few of the suggestions you can use to speed your Xcode build times. The following resources can provide additional information and suggestions on improving your Xcode build times.


Apple has announced Xcode version 12 at #WWDC20; they released the beta version on the same day. Xcode is in the middle of all development on Apple's platforms, and with Xcode 12, it's a fresh update to match macOS Big Sur.

With Xcode-12, it is faster to open multiple files. Navigator fonts now match the system size or are often set to small, medium, or large. And Xcode 12 builds macOS Universal apps by default to support new Macs with Apple silicon.

Xcode 12 release includes Swift 5.3 and SDKs for iOS 14, iPadOS 14, tvOS 14, watchOS 7, and macOS 11. The Xcode 12 beta release supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 12 beta requires a Mac running macOS Catalina 10.15.4 or later.iOS nine and later, tvOS 9 and later, and watchOS 2 and later. Xcode 12 beta requires a Mac running macOS Catalina 10.15.4 or later.

What's New in Xcode 12?

SwiftUI

SwiftUI (no SwiftUI 2.0) offers some new features with many performance improvements. The existing SwiftUI code continues to figure, with faster performance, better diagnostics, and access to further controls.

SwiftUI has a complete new lifecycle management API for apps built with SwiftUI. So, now you'll share life cycle code across all Apple platforms.

With Xcode 12, SwiftUI views can now be shared with other developers, and appear as first-class controls within the Xcode library.

Organizer

Xcode 12 features an entirely new Organizer with an all-new design that groups all critical information about each of your apps together. Choose any app from any of your developer teams, then quickly navigate to examine crash logs, energy reports, and performance metrics, like battery consumption and launch time of your apps when employed by customers.

The organizer now displays scroll-hitch metrics. You'll use these metrics to spot animation delays users encounter while scrolling in your application. To look at the Scroll Hitch bar chart, click on the Scrolling section within the Metrics Organizer window.

The organizer now also provides Disk Writes diagnostic reports. You'll use these reports to optimize the disk-write performance of your apps.

Interface Builder

Xcode 12 features a new tab model. With this updated model, you'll re-arrange the document tabs to make a working set of files for your current task, and configure how content is shown within each tab.

Xcode 12 comes with a replacement code completion UI with only the knowledge you would like. So, it's more compact and takes up less screen space.

The project navigator now takes advantage of the system setting to resize 'Sidebar Font & Icon Size,' almost like Finder. You can also choose a single font and icon size for Xcode within Xcode Preferences.

Xcode 12 adds a replacement minimap for the Interface Builder canvas. You can drag, double-click or command-click within the minimap to specialize in a selected area. You can enable and disable this minimap with Editor > Canvas > Minimap. This may be very helpful in large size storyboards.

Debugging

Xcode 12 now displays the breakpoint hit count for a specific breakpoint location. Like 'Thread 1: breakpoint 1.1 (14), ' 14 means breakpoint 1.1 has been hit 14 times.

You can re-order breakpoint actions by dragging and dropping them into a unique position. You can name a breakpoint, and reference it by name from another breakpoint's work. For instance, to enable a previously disabled breakpoint called 'MyBreakpoint,' type break enables MyBreakpoint in an action's Debugger Command field.

The breakpoint contextual menu now has a choice to delete all the disabled breakpoints.

Simulator

To keep Simulator ahead of other applications, you'll select Window > to stay Top. Now Simulator, by default, uses the internal microphone unless you manually select a particular audio source.

Simulator now supports 32-bit & 64-bit processes for watchOS 7. To verify watchOS projects are 64-bit clean in Simulator, confirm ARCHES is about to its default value.

With Xcode 12, Simulator supports simulating Nearby Interaction for devices that support the feature. Dragging the device window around on the screen will update the simulated distance between the two devices.

Playgrounds

Playgrounds now support asset catalogs. https://coolsfile319.weebly.com/flux-6-0-26-advanced-web-design-tool.html.

Xcode 12 Report Navigator now includes Playground build logs alongside Project build logs. If a Playground live view features a size of zero, a banner now indicates why the live view isn't visible.

Xcode Playground now automatically compiles Core ML models in its Resources folder, and Playground code can access the generated ML model interface.

Xcode Playgrounds can now import and use Swift packages and frameworks. Select the Build Active Scheme checkbox within the Playground's File inspector and make sure that the active scheme builds the package or framework target.

Store Kit (Local Test Environment)

https://ityj.over-blog.com/2020/12/audio-sound-effects-software.html. Xcode 12 now supports the testing of In-App Purchases (IAP) directly in Simulator or on a connected device, employing a new local StoreKit test environment.

Xcode For Windows

It is now possible to customize Default Execution Time Allowance and Maximum Execution Time Allowance within the Test Plan Editor. But during this version of Xcode, these settings are disabled.

UI Testing now can handle banner notifications on iOS that block the navigation bar during UI testing.

Swift Packages

You can now declare conditionals Swift packages target dependencies, like limiting the dependencies by a platform.

Swift packages can now contain resources like asset catalogs, images, localized content (.lproj), storyboards, and other files. A dependent package adds the package's code and support to the app bundle to be used at runtime.

Xcode
Universal Apps

Xcode 12 for macOS Universal Apps includes a standard macOS SDK that contains all the frameworks, debuggers, compilers, and everyone other tools you would like to create apps to support Apple Silicon and Intel x86_64 CPU. Even Xcode 12 is made as a Universal app.

When you open your existing project in Xcode 12, your app will automatically get updated to get release builds & archives as Universal apps.

Conclusion

Xcode 12 run destination menu added an 'Any Mac' destination for Mac schemes. This new build destination will build each target within the system for all supported architectures, no matter the native structure of the local Mac.





Publicité
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article