Why Your Mac Is Slowing Down Your Dev Workflow

Theo - t3.gggo watch the original →

Apple's APFS file system struggles with the high-frequency metadata operations and small-file handling required by modern agentic development, making it significantly slower than Linux-based alternatives like XFS or ext4 for tasks like npm installs and git worktree management.

The Performance Gap

Modern development, especially when utilizing AI agents, involves constant cloning of repositories, managing multiple worktrees, and frequent npm install operations. Theo demonstrates that these tasks, which are metadata-heavy, perform significantly worse on macOS (APFS) compared to Linux (ext4/XFS). Benchmarks show that deleting node_modules and running package installs can be 5x to 10x slower on an M1 Max Mac than on a standard Linux machine, even when the Mac's raw SSD speed is superior. The bottleneck is not the hardware, but the file system's handling of small files and metadata.

Why APFS Struggles

APFS (Apple File System) was designed for general-purpose consumer use, prioritizing data integrity and seamless updates for iPhones and Macs. However, its implementation of features like copy-on-write and hard-linking introduces massive overhead for developer-specific workflows. When performing operations that require creating thousands of small files or managing complex link structures, APFS experiences significant latency compared to the leaner, more performant Linux file systems. While Apple's file system team is highly capable, their current design compromises do not align with the needs of high-frequency, agent-driven development.

Evaluating File System Alternatives

Theo explores several alternatives, including ext4, XFS, ZFS, and Btrfs. While ext4 offers excellent raw speed for small file writes, it lacks advanced features like efficient copy-on-write. ZFS and Btrfs are powerful but often overkill for local development, as they are primarily optimized for RAID and storage-heavy workloads. The standout recommendation is XFS, particularly when paired with VDO (Virtual Data Optimizer) for compression. This combination provides a balance of speed and space efficiency, allowing for deduplication and compression without the massive performance penalties seen in APFS when handling large numbers of small files.

The Role of Compression and Linking

Effective development environments benefit from file systems that can handle deduplication and compression transparently. Features like VDO allow for significant space savings by compressing data before it hits the drive, which is crucial when working with multiple clones of large projects. However, these features introduce CPU overhead. The choice of compression algorithm matters; LZ4 is highlighted as a lightweight option that keeps read/write operations fast while still providing meaningful space savings, making it an ideal candidate for high-performance dev machines.

  • #dev-tooling
  • #performance
  • #macos
  • #linux

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.