Skip to content

feat: Xcode + build toolchain classifier with per-project session grouping #43

Description

@alecf

Summary

A single Xcode build spawns a swarm of processes that are completely opaque in memory monitors today: multiple parallel swift-frontend compiler jobs, sourcekit-lsp, lldb-rpc-server, xctest runners, xcodebuild, and CoreSimulator daemons. None of them are associated with each other or with the Xcode project they belong to.

An XcodeClassifier would unify all of these under a single group, labeled by the project being built — giving the same per-session clarity that ClaudeCodeClassifier gives for Claude Code sessions.

Processes to claim

Process Notes
Xcode Main app
xcodebuild CLI builds; use working dir for project label
swift-frontend Parallel compiler jobs; can be many
sourcekit-lsp Language server
lldb-rpc-server Debugger
xctest Test runner
com.apple.CoreSimulator.* Simulator daemons
Simulator iOS/tvOS/watchOS simulator UI
XCTRunner UI test runner

Value

Developers know Xcode is slow and memory-hungry, but have no visibility into what within Xcode is consuming memory. Seeing "Xcode — MyApp.xcodeproj: 4.2 GB (12 swift-frontend jobs)" is a big step up from Activity Monitor.

Implementation notes

  • Root detection: com.apple.dt.Xcode bundle ID for the app; xcodebuild executable name for CLI builds
  • Project label: parse -project / -workspace / -scheme args from xcodebuild command line, or use Xcode's working directory
  • Descendant collection: same recursive parent-PID walk as ClaudeCodeClassifier
  • CoreSimulator daemons: detect by process name prefix; associate with the Xcode session that launched them via responsiblePid
  • stableIdentifier: "xcode:<project-path>" for stable trending across builds

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions