Skip to content

What is SourceKitService on Mac?

By Junaid, maker of Taskglass · Last reviewed

Powers Swift code completion, syntax highlighting and error checking in Xcode.

SourceKitService understands your Swift code as you type in Xcode: it provides code completion, syntax highlighting, jump-to-definition and live error checking. It's part of the Swift toolchain. On large projects, or with very complex expressions that are hard for the compiler to work out, it can use a lot of CPU and memory.

Category
Developer tools
Made by
Apple
Safe to quit:
With care

Shown in Activity Monitor as SourceKitService

Why is SourceKitService using so much CPU or memory?

  • Opening or editing a large Swift project
  • Complex expressions that are slow to type-check
  • Switching branches, so lots of code changed at once

What to do

  1. 1Wait for Xcode's indexing to finish
  2. 2Break very long expressions into smaller pieces with explicit types
  3. 3Force quit SourceKitService; Xcode restarts it automatically
  4. 4Delete Derived Data (Xcode Settings > Locations) and restart Xcode if it stays stuck

Safe to quit? With care.

Xcode restarts it automatically; code completion pauses for a moment.

Typical usage

Rough ranges on Apple Silicon Macs. Yours will vary.

Memory
200 MB – several GB on large projects

Related processes

Part of the Taskglass Process Library

See it live in Taskglass.

Taskglass shows what SourceKitService is doing on your Mac right now, explains it in plain English, and tells you if it's safe. It does the same for 213 other processes.