Thrum

Why is Xcode using so much CPU and memory on my Mac?

Last reviewed: 19 November 2026.

Xcode's heaviest work runs in separate processes: SourceKitService and the indexer analyze your code for completion and navigation, the build service starts many swift-frontend and clang compiler processes in parallel, and Simulator runs each simulated device as its own set of processes. A first build, a clean build, opening a large project, or switching branches triggers most of it. Product > Perform Action > Build With Timing Summary shows where build time goes.

Which Xcode processes use the CPU?

ProcessWhat it does
XcodeThe editor and project windows.
SourceKitServiceCode completion, syntax highlighting, live issues and indexing for Swift.
XCBBuildService or SWBBuildServicePlans and schedules builds. Xcode 26.6 ships both build service bundles.
swift-frontend, clangThe Swift and C/Objective-C compilers. A build runs many at once, one per core or more.
ibtooldCompiles and renders storyboards and XIB files.
CoreSimulatorService, launchd_simManage and run simulated devices.

Why do Xcode builds use every CPU core?

Apple's build documentation says Xcode does as much work as possible in parallel, and that fewer dependencies between targets allow more parallelism. A full build therefore saturates the CPU by design and finishes sooner because of it. The first build after opening a project or cleaning builds everything; later builds are incremental.

Since Xcode 16, module dependencies are built as explicit tasks that appear in the build log. Targets that use the same modules with different compiler options, for example different Preprocessor Macros, cannot share built modules, so Xcode builds several variants of the same module.

How do you make Xcode builds and indexing lighter?

  1. Measure the build. Choose Product > Perform Action > Build With Timing Summary, then select the build in the Report navigator to see which tasks take the longest. From Terminal, xcodebuild -showBuildTimingSummary does the same.
  2. Give Run Script phases inputs and outputs. Xcode runs a script phase on every build unless it has at least one input file and one output file. Add them in the Run Script build-phase editor so unchanged scripts are skipped.
  3. Check the build order. If targets do not build in parallel, open the Scheme Editor and set Build Order to Dependency Order.
  4. Shut down simulators you are not using. Each booted simulator runs a full set of system processes. Shut down the ones you are not testing on; xcrun simctl shutdown all in Terminal shuts down every booted simulator.
  5. Look at single slow files. If one file compiles much longer than others, Apple's guidance is to check it for header import problems.

When is Xcode's CPU or memory use a problem?

Compilers at full CPU during a build, and SourceKitService busy for a while after opening a project, are normal. SourceKitService pinned near 100% CPU long after indexing should have finished, or growing to many gigabytes while you edit one file, points to a single complex expression or a stuck index; quitting Xcode restarts it. Deleting the project's Derived Data folder forces a fresh index and full rebuild, so keep it for when other steps fail.

How can Thrum help with Xcode?

Thrum keeps a live CPU graph in the menu bar. One click shows the eight processes using the most CPU, so you can see when Xcode is among them and how much it takes. An optional alert tells you when a process stays above a CPU level you choose (50 to 200% of one core) for 1 to 10 minutes. Click Xcode in the list for its PID, threads and memory, and Quit or Force Quit it after a confirmation.

Thrum is $4.99 once with a 14-day free trial and no account. It requires macOS 26 Tahoe on Apple silicon or Intel.

Questions

What is SourceKitService?

It is the service behind Xcode's Swift editor features: completion, highlighting, jump to definition and indexing. It runs outside Xcode so a crash does not take down the editor.

Why does my Mac slow down while Xcode builds?

Xcode runs compiler processes on every core to finish sooner. Other apps get less CPU time until the build ends.

Sources