Everywhere All articles Download

How macOS actually works

How a file index works

Updated 2026-07-31 · 5 min read

Every fast search tool is fast for the same reason: it did the work earlier.

The problem

There are perhaps six million files on a typical Mac. Asking the filesystem about each one takes tens of seconds. Doing that on every keystroke is impossible.

The trick

Read the filesystem once. Keep the answer. Search the answer.

An index is a prepared copy of the questions you will ask — usually filenames, sometimes contents, sometimes both. Searching it never touches the disk.

What goes in it

A filename index needs surprisingly little: the name, a pointer to the parent folder, size, modification date, and which volume it is on. About 24 bytes per file plus the name itself.

Six million files works out around 308 MB — small enough to memory-map, which means the operating system pages it in and out as needed and it does not sit on the heap.

Why full paths are not stored

Storing /Users/sam/Documents/Projects/2026/report.pdf for every file repeats every folder name thousands of times and costs gigabytes. Instead each record points at its parent, and the full path is reconstructed by walking up — but only for the forty rows actually visible on screen.

Keeping it current

Two approaches:

replayable position, so an index can catch up on what it missed while closed.

The second is the difference between an index that is right and one that is right eventually.

Content indexing is a different animal

Indexing what files *say* means parsing every format and building an inverted index of words. Orders of magnitude more work, much larger, and much slower to update. That is why Spotlight takes hours where a filename index takes half a minute — it is doing a fundamentally bigger job.

Common questions

Does an index need a lot of RAM?

Not if it is memory-mapped. Pages load on demand and the kernel can evict them under pressure.

Why is the first index slow but later ones fast?

The first must read the whole directory tree. After that only changes are processed.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Download for Mac

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Articles Privacy Support