Psychosonic Lab · Experiment 04
Does the index build finish at 100,000 files?
A library size is easy to claim. We wanted to watch one get built. This test builds Bibliome's search index over 100,000 PDF files on a single Mac, four times, and logs how busy the Mac was at every step. All four builds finished and indexed every file. The fastest took 20 minutes and the slowest 58, and the page shows what the Mac was doing in each. Two of the four went quiet for about 17 minutes partway through and then carried on to the end. Two follow-up runs went looking for the reason, and one caught a silence as it happened. macOS had put up a dialog asking whether to download a font that one of the 100,000 files names and does not include, and the build waited for the answer. The two long silences carry the same marks in the system log, and the page shows how far that evidence goes and where it stops. A seventh run, on a build with a fix that was not yet in a released version on 9 November, built the 100,000 files twice with no dialog and no silence over 90 s. The files are real government documents, almost all different from each other, which is a different shape from a person's own library. The sections below say what was run, what came back, and what the test cannot tell you.
The question
What is being asked
Does the search index build finish when the library holds 100,000 files, and what does it cost in time, memory and disk? Two more questions ride on it. Does building again over an index that already exists reuse the work, or start over? And what does a full scan, which does more than build the index, cost at 10,000 files?
Why this number
An earlier version of the index build compared each file against the others in a way that made its cost grow with the square of the library. That is invisible at a few thousand files and decisive at a hundred thousand. This test was built to find that shape.
What counts as finishing
The build reports that it ran, that it processed every file it found, and that it hit no error, and the finished index holds a document for every file. A build that stops, or that the system ends, does not count. A build that finishes after sitting silent for a quarter of an hour has finished, and we say so, but its time is not a measurement of the build. So we also record the longest silence in every step.
What came up
In the first run the 100,000 file build went silent for about 17 minutes. A fourth question joined the test: what was it waiting for, and does it come back? The next night's run did it again. We then changed two things and ran it twice more. Two follow-up runs, 5 and 6, came later, to see inside a silence while it happened. Run 7 came last, on a build with a fix.
Method
The files
GovDocs1, a public collection of PDFs from US government web sites, kept at digitalcorpora.org. The test uses three folders of 10,000, 30,000 and 100,000 files, each the first part of the next. Counted by checksum, they hold 9,995, 29,978 and 99,730 different files, so almost every file is a different document. The folders are APFS clones of the downloaded files, which cost almost no disk, and nothing in the test writes to them. The scan test ran over its own fresh clone of the first 10,000 files, because a scan writes next to the files it reads.
What was timed
Two things. The index test builds only the search index, from walking the folders to writing the index file. A test harness calls the app's own indexing code with no window open. A cold build starts with no index. A rebuild runs again over the finished index. The scan test runs the steps of the app's own scan over the first 10,000 files, in order: OCR, the app's Python pipeline, and the word index. AI Classify did not run, because the run was unattended and it waits for a person to review the categories first. The meaning index is not part of either test.
What was recorded
Build time as the harness reports it. The largest resident set size and the peak memory footprint, read from /usr/bin/time -l. The index size on disk. The footprint counts memory macOS has compressed, and it is the better measure of the pressure a build puts on the Mac. The resident figure leaves compressed memory out. The harness also writes a heartbeat line every 15 seconds, and we record the longest time without one.
How busy the Mac was
A build timed on a Mac that is busy with something else is a measurement of both. So the queue that ran this waits for a quiet Mac before each step, holds the Mac awake, and records for every step the CPU used by everything outside the test, the pages the Mac swapped out, and whether it slept. We set the line before the first run. A step is quiet if other processes averaged under 250 percent of one core (this Mac has 12 cores, so 1,200 percent is all of it) and fewer than 20,000 pages went out. A step above the line is kept and marked contended. The line does not look at swap or at the build going silent, so we record the swap in use when each step began, and a silence of more than 90 seconds is marked. A step with a silence that long is kept, and its time is not used as a measurement.
The build
Bibliome 1.9.0 (95), a Release build of the shipping source plus the measurement harness. It is not the app from the store: it is not signed for the store, and it has no window open. The harness is not part of the app. Two copies of it ran. Runs 1 and 2 used the build as it came, whose ad-hoc signature does not match its contents: the Mac's own check, codesign --verify, says it has no resources but its signature says it must have some. Runs 3 and 4 used a copy of the same build with its signature redone so that it passes.
The four runs
Run 1 ran the whole test, the index builds and the scan, at night. Runs 2, 3 and 4 ran the index builds only, to see whether the silence came back: run 2 at night, run 3 in the afternoon with other work going on, run 4 at night. macOS was updated from 27.0.1 to 27.2 between runs 1 and 2, so run 2 went silent on the newer version as run 1 had on the older.
What we changed after run 2
Two things, both aimed at the silence. LaunchServices, the macOS service that keeps the list of installed apps, held 20 registrations for copies of Bibliome. 12 pointed at folders that no longer existed. We removed those 12, which leaves 8, all of them real. And we made the copy with the redone signature. We also added a capture that, when a step goes 45 seconds without a heartbeat, records what the app is doing. We did not change the app or the harness.
Runs 5 and 6
An exact copy of the original harness app, given its own bundle identifier so that LaunchServices keeps a separate record for it, built the 100,000 files from nothing twice in each run. Run 5 first built a window of 7,772 files, folders 300 to 329, near where the first silences began. For run 6 the capture could run up to 24 times in a step, where before it stopped at 4. Afterwards we read one file alone, in the harness and in a small test app, with the font it names removed from the Mac again.
Run 7
A fix in the app. Before it reads a file in the background, the app now looks at the fonts the file names. If one is not in the file, not on the Mac, and is one macOS downloads only after asking, the app reads the text from a copy in memory with that font's name swapped for one macOS does not know, so nothing asks. If it cannot make such a copy it leaves the file unread and says so. The file on disk is not changed. Run 7 built Bibliome's source as of 8 November with the fix, plus the same harness, in a copy with its own bundle identifier, and built the 100,000 files from nothing twice. Osaka was not on the Mac, and the queue would not start if it was.
Materials
The extractor
One file of Python, 304 lines, standard library only. It reads the harness logs and writes the tables below, and nothing else. Read it before you run it. It is shown in full below with its checksum.
What is not published
The harness is a small piece of code compiled into a build of the app's source, so it is not published. The files are not published either: they belong to their collection, linked under Method. The logs the harness wrote are linked next to the tables, filtered to the harness's own lines, with the home folder replaced by ~. Each run also has a short system-log.txt, the lines the app wrote to the macOS system log about LaunchServices during that run, with the command that found them. Runs 5 and 6 are published the same way. Run 6 also has font-helper.txt, the log lines of macOS starting its font download helper; capture-in-silence.txt, a cut-down copy of the capture taken inside its silence; font-scan, our scan of all 100,000 files for fonts macOS downloads on request; and repro, the one-file reproduction with the test app's source. Run 7 has a font-helper.txt and a system-log.txt from the same queries, with a count of other services starting in the same hours so that an empty answer means something; index-check.txt, the text each index in runs 6 and 7 holds for the file that names Osaka; and captures.txt, cut down from its 6 captures. The fix is part of the app and is not published.
Show the script in full
#!/usr/bin/env python3
"""Turn the logs of an index-build run into one table.
The harness that ran the builds writes its own lines (they start with "SCALE") and the
shell wraps the run in /usr/bin/time -l, which adds the real, user and sys seconds, the
largest resident set size and the peak memory footprint. This script reads those two
things and nothing else, so every figure in the table can be found in a log line.
It also writes a filtered copy of each log: the SCALE lines, the time block and the app's own
[FileAccess] lines (a bookmark check it makes about every 90 s), with the home folder replaced
by ~. The rest of a raw log is PDFKit warnings about the test files.
Usage:
python3 -I extract-scale.py <log-dir> <out-dir> the 2026-10-12 runs
python3 -I extract-scale.py <log-dir> <out-dir> --queue <RUN> every <RUN>-*.log a queue
(run-when-quiet.sh) wrote
The queue mode also reads <RUN>.conditions.tsv (what else the Mac was doing during each
phase) and writes queries.tsv beside runs.tsv. It checks every scan phase's isolation:
the scan journal's allowed_roots must be the phase's own test root and nothing else, and
outside_root must be 0. If any scan phase fails or cannot show that, the tables are still
written but the script exits 1, because those numbers include files that were not the
test corpus (2026-10-15: a scan read 36 files from the real inbox). It also exits 1 when the
attempt to quote slept (the conditions file says so): its times include the sleep.
It also reads the harness's heartbeat (one line every 15 s, from a timer thread) and records
the longest silence in each log as max_heartbeat_gap_s. A gap over STALL_S means the process
stopped making progress for that long, whatever the Mac's CPU was doing, so the step's time is
not a measurement of the build: the script says STALLED and exits 1. (2026-10-28: a 100,000
file build had a silence of 1,005 s and 196 s, with 274 documents done in the longer one, and
the queue still called the step quiet because it only watches other processes' CPU.)
Standard library only. It reads files and writes files; it makes no network connection.
"""
import json
import os
import re
import sys
# log file -> (group, label). The group says which build and which files; it is a label
# for a human, the figures come from the log.
RUNS = [
("fixed-R010-cold.log", "A", "10,000 files, cold"),
("fixed-R030-cold.log", "A", "30,000 files, cold"),
("fixed-R100-cold.log", "A", "100,000 files, cold"),
("fixed-R100-warm.log", "A", "100,000 files, rebuilt over the finished index"),
("merged-R100-cold.log", "B", "100,000 files, cold"),
("merged-R100-warm.log", "B", "100,000 files, rebuilt over the finished index"),
("real-library-cold.log", "R", "One real library, cold"),
("real-library-warm.log", "R", "One real library, rebuilt over the finished index"),
]
DONE = re.compile(r"SCALE DONE phase=(\S+) didBuild=(\S+) processed=(\d+) total=(\d+) "
r"elapsed_s=([\d.]+) db_bytes=(\d+) peak_rss_gb=([\d.]+) error=(.*)$")
TIME = re.compile(r"^\s*([\d.]+) real\s+([\d.]+) user\s+([\d.]+) sys\s*$")
RSS = re.compile(r"^\s*(\d+)\s+maximum resident set size\s*$")
FOOT = re.compile(r"^\s*(\d+)\s+peak memory footprint\s*$")
# Lines the queue-era harness adds (2026-10-15 on).
START = re.compile(r"^SCALE start phase=\S+ root=(.*) db=\S+$")
ENV = re.compile(r"^SCALE env commit=(\S+) app=(.*?) macos=.* load=([\d.]+) [\d.]+ [\d.]+ "
r"swap_used_gib=([\d.]+)")
MEMORY = re.compile(r"^SCALE memory .*swap_used_gib=([\d.]+) load=([\d.]+) ")
STAGE = re.compile(r"^SCALE stage name=(\w+) elapsed_s=([\d.]+)(?: processed=(\d+))?")
VERIFY = re.compile(r"^SCALE verify (.*)$")
SKIPPED = re.compile(r"^SCALE skipped (.*)$")
HEARTBEAT = re.compile(r"^SCALE heartbeat t=(\d+)s")
# The heartbeat comes every 15 s. Last night's other steps never went past 60 s of silence.
STALL_S = 90
QUERY = re.compile(r"^SCALE query term=(\S+) quick_hits=(\d+) quick_ms=([\d.]+) "
r"full_hits=(\d+) full_ms=([\d.]+)")
RUN_JSON = re.compile(r"^SCALE run_json dir=\S+ (\{.*)$")
EXIT = re.compile(r"^=== exit=(\d+)")
PHASE = re.compile(r"^(smoke|R\d{3})-(index|scan)-(cold|warm)(?:-r(\d))?$")
COLUMNS = ["file", "group", "label", "did_build", "files", "total", "elapsed_s", "real_s",
"user_s", "sys_s", "max_rss_bytes", "peak_footprint_bytes", "index_bytes", "error"]
QCOLUMNS = ["phase", "size", "tier", "temp", "attempt", "use", "exit", "commit", "app",
"did_build", "files", "total", "elapsed_s", "real_s", "user_s", "sys_s",
"max_rss_bytes", "peak_footprint_bytes", "index_bytes",
"ocr_s", "ocr_docs", "pipeline_s", "word_index_s",
"verify_ok", "verify_docs", "empty_body", "outside_root",
"skipped_locked", "skipped_unreadable", "skipped_damaged", "skipped_online_only",
"root", "allowed_roots", "isolation",
"load1_start", "load1_end", "swap_start_gib", "swap_end_gib",
"other_cpu_mean", "other_cpu_max", "pageouts", "swap_mb_start", "swap_mb_end",
"verdict", "slept", "max_heartbeat_gap_s", "error"]
QUERY_COLUMNS = ["phase", "term", "quick_hits", "quick_ms", "full_hits", "full_ms"]
# run-when-quiet.sh writes this file with no header line. "slept" was added 2026-10-17; a
# file from an earlier queue has the first seven columns only, and slept stays blank.
CONDITION_COLUMNS = ["phase", "other_cpu_mean", "other_cpu_max", "pageouts",
"swap_mb_start", "swap_mb_end", "verdict", "slept"]
def fields(text):
"""'docs=10 ok=true' -> {'docs': '10', 'ok': 'true'}"""
return dict(kv.split("=", 1) for kv in text.split() if "=" in kv)
def parse(path):
row = {c: "" for c in COLUMNS + QCOLUMNS}
keep, queries, roots, in_time, beats = [], [], [], False, []
with open(path, encoding="utf-8", errors="replace") as f:
for line in f:
line = line.rstrip("\n")
m = DONE.search(line)
if m:
row.update(did_build=m.group(2), files=m.group(3), total=m.group(4),
elapsed_s=m.group(5), index_bytes=m.group(6), error=m.group(8).strip())
t = TIME.match(line)
if t:
in_time = True
row.update(real_s=t.group(1), user_s=t.group(2), sys_s=t.group(3))
if (m2 := RSS.match(line)):
row["max_rss_bytes"] = m2.group(1)
if (m3 := FOOT.match(line)):
row["peak_footprint_bytes"] = m3.group(1)
if (s := START.match(line)):
row["root"] = s.group(1)
if (e := ENV.match(line)):
row.update(commit=e.group(1), app=e.group(2), load1_start=e.group(3),
swap_start_gib=e.group(4))
if (mm := MEMORY.match(line)):
row.update(swap_end_gib=mm.group(1), load1_end=mm.group(2))
if (st := STAGE.match(line)):
row[f"{st.group(1)}_s"] = st.group(2)
if st.group(1) == "ocr":
row["ocr_docs"] = st.group(3) or ""
if (v := VERIFY.match(line)):
kv = fields(v.group(1))
row.update(verify_ok=kv.get("ok", ""), verify_docs=kv.get("docs", ""),
empty_body=kv.get("empty_body", ""),
outside_root=kv.get("outside_root", ""))
if (sk := SKIPPED.match(line)):
for k, val in fields(sk.group(1)).items():
row[f"skipped_{k}"] = val
if (hb := HEARTBEAT.match(line)):
beats.append(int(hb.group(1)))
if (q := QUERY.match(line)):
queries.append(list(q.groups()))
if (rj := RUN_JSON.match(line)):
try:
roots.append(json.loads(rj.group(1)).get("allowed_roots") or [])
except ValueError:
roots.append(None)
if (x := EXIT.match(line)):
row["exit"] = x.group(1)
if line.startswith("SCALE ") or in_time or line.startswith("=== ") or "[FileAccess]" in line:
keep.append(line.replace(os.path.expanduser("~"), "~"))
# Longest silence: between the start, each beat, and the end of the build. A step shorter
# than one beat has no beats at all, and its gap is its own length.
if row["elapsed_s"]:
marks = [0] + beats + [max(float(row["elapsed_s"]), beats[-1] if beats else 0)]
row["max_heartbeat_gap_s"] = str(round(max(b - a for a, b in zip(marks, marks[1:]))))
home = os.path.expanduser("~")
row["allowed_roots"] = ";".join(sorted({r.replace(home, "~") for rs in roots if rs for r in rs}))
return row, keep, queries, roots
def isolation(row, roots):
"""ok: every scan journal lists the phase's root and nothing else, and outside_root is 0.
FAIL: some journal lists another root, or outside_root is not 0. unknown: no journal, or
one that would not parse. n/a: an index phase, which writes no scan journal."""
if not roots:
return "unknown" if row["tier"] == "scan" else "n/a"
if any(rs is None for rs in roots):
return "unknown"
if any(set(rs) != {row["root"]} for rs in roots):
return "FAIL"
if row["outside_root"] not in ("", "0"):
return "FAIL"
if row["tier"] == "scan" and row["outside_root"] == "":
return "unknown" # the harness before 060e62f2 did not count it
return "ok"
def write_tsv(path, columns, rows):
with open(path, "w", encoding="utf-8") as f:
f.write("\t".join(columns) + "\n")
for r in rows:
f.write("\t".join(str(r[c]) for c in columns) + "\n")
def main_fixed(src, out):
rows = []
for name, group, label in RUNS:
path = os.path.join(src, name)
if not os.path.exists(path):
print(f"missing: {name}", file=sys.stderr)
continue
row, keep, _, _ = parse(path)
row.update(file=name, group=group, label=label)
rows.append(row)
with open(os.path.join(out, name), "w", encoding="utf-8") as f:
f.write("\n".join(keep) + "\n")
write_tsv(os.path.join(out, "runs.tsv"), COLUMNS, rows)
print(f"wrote {len(rows)} rows to {os.path.join(out, 'runs.tsv')}")
def main_queue(src, out, run):
conditions = {}
cpath = os.path.join(src, f"{run}.conditions.tsv")
if os.path.exists(cpath):
with open(cpath, encoding="utf-8") as f:
for line in f:
parts = line.rstrip("\n").split("\t")
if len(parts) in (len(CONDITION_COLUMNS) - 1, len(CONDITION_COLUMNS)):
conditions[parts[0]] = dict(zip(CONDITION_COLUMNS, parts))
else:
print(f"no {run}.conditions.tsv (queues before 2ae51e9 did not record one)",
file=sys.stderr)
names = sorted(n for n in os.listdir(src) if n.startswith(run + "-") and n.endswith(".log"))
if not names:
sys.exit(f"no {run}-*.log in {src}")
rows, qrows = [], []
for name in names:
phase = name[:-len(".log")]
row, keep, queries, roots = parse(os.path.join(src, name))
p = PHASE.match(phase[len(run) + 1:])
if p:
row.update(size=p.group(1), tier=p.group(2), temp=p.group(3),
attempt=p.group(4) or "1")
else:
print(f"phase name not understood, kept with blanks: {phase}", file=sys.stderr)
row["phase"] = phase
row["isolation"] = isolation(row, roots)
c = conditions.get(phase, {})
for k in CONDITION_COLUMNS[1:]:
row[k] = c.get(k, "")
rows.append(row)
qrows += [dict(zip(QUERY_COLUMNS, [phase] + q)) for q in queries]
with open(os.path.join(out, name), "w", encoding="utf-8") as f:
f.write("\n".join(keep) + "\n")
# The queue reruns a grossly contended phase as -r2, then -r3: the last attempt is the
# one to quote, the others stay in the table marked superseded.
last = {}
for r in rows:
key = (r["size"], r["tier"], r["temp"])
if r["attempt"] and int(r["attempt"]) >= int(last.get(key, {}).get("attempt") or 0):
last[key] = r
for r in rows:
if not r["attempt"]:
r["use"] = "?"
else:
r["use"] = "yes" if last.get((r["size"], r["tier"], r["temp"])) is r else "superseded"
write_tsv(os.path.join(out, "runs.tsv"), QCOLUMNS, rows)
write_tsv(os.path.join(out, "queries.tsv"), QUERY_COLUMNS, qrows)
print(f"wrote {len(rows)} rows to {os.path.join(out, 'runs.tsv')}, "
f"{len(qrows)} to queries.tsv")
bad = 0
for r in rows:
if r["use"] != "yes":
continue
if r["slept"] == "yes":
bad += 1
print(f"SLEPT {r['phase']}: the Mac slept during the phase, so its wall-clock "
f"times include the sleep", file=sys.stderr)
if r["max_heartbeat_gap_s"] and int(r["max_heartbeat_gap_s"]) > STALL_S:
bad += 1
print(f"STALLED {r['phase']}: no heartbeat for {r['max_heartbeat_gap_s']} s (more than "
f"{STALL_S}), so the process stopped making progress and its time is not a "
f"measurement of the build", file=sys.stderr)
if r["tier"] == "scan" and r["isolation"] != "ok":
bad += 1
print(f"UNTRUSTED {r['phase']}: isolation={r['isolation']} "
f"allowed_roots={r['allowed_roots'] or '(none recorded)'} "
f"outside_root={r['outside_root'] or '(not counted)'}", file=sys.stderr)
if r["exit"] not in ("", "0") or not r["did_build"]:
print(f"INCOMPLETE {r['phase']}: exit={r['exit'] or '?'} "
f"done_line={'yes' if r['did_build'] else 'no'}", file=sys.stderr)
if r["verdict"] and r["verdict"] not in ("quiet", "slept"):
print(f"{r['verdict'].upper()} {r['phase']}: other CPU mean {r['other_cpu_mean']}%, "
f"max {r['other_cpu_max']}%, {r['pageouts']} pages out", file=sys.stderr)
if bad:
sys.exit(f"{bad} phase(s) slept, stalled, or scanned without proof of staying inside "
f"their test root: do not publish their numbers")
def main():
args = sys.argv[1:]
if len(args) == 2:
src, out, run = args[0], args[1], None
elif len(args) == 4 and args[2] == "--queue":
src, out, run = args[0], args[1], args[3]
else:
sys.exit(__doc__)
os.makedirs(out, exist_ok=True)
if run:
main_queue(src, out, run)
else:
main_fixed(src, out)
if __name__ == "__main__":
main()
Results
Run 1: building the search index
| Step | Build time | Per file | Largest resident | Peak footprint | Index | Index per file | The Mac | Raw |
|---|---|---|---|---|---|---|---|---|
| 10,000 files, cold build | 136.0 s | 13.6 ms | 3.5 GB | 3.4 GB | 861 MB | 88.1 KB | quiet (other CPU 84%) | log |
| 10,000 files, rebuilt | 13.8 s | 0.4 GB | 0.3 GB | 861 MB | 88.1 KB | quiet (other CPU 31%) | log | |
| 30,000 files, cold build | 527.2 s | 17.6 ms | 6.6 GB | 8.2 GB | 2,645 MB | 90.3 KB | quiet (other CPU 48%) | log |
| 30,000 files, rebuilt | 49.3 s | 0.6 GB | 0.4 GB | 2,648 MB | 90.4 KB | contended (other CPU 254%) | log | |
| 100,000 files, cold build | 2,534.3 s | 25.3 ms | 8.1 GB | 16.5 GB | 8,305 MB | 85.0 KB | quiet (other CPU 156%), silent 1,005 s | log |
| 100,000 files, rebuilt | 190.4 s | 1.3 GB | 0.9 GB | 8,296 MB | 85.0 KB | quiet (other CPU 146%) | log |
GB here means 230 bytes, as macOS reports memory, and MB means 220. Build time is the figure the harness reports. Per file is build time divided by files. Rows in italics are marked contended or went silent for more than 90 s. Their figures are shown and not used anywhere on this page.
All 26 steps in the four runs reported that they built, that they processed every file they found, and that they hit no error, and each finished index held a document for every file.
Time in run 1. Building from nothing took 136.0 s at 10,000 files and 527.2 s at 30,000, which is 13.6 ms and 17.6 ms per file. The 100,000 file step took 2,534 s, and 1,005 s of that was silence, so it is not used.
Memory in run 1. The peak footprint of a cold build was 3.4 GB at 10,000 files, 8.2 GB at 30,000 and 16.5 GB at 100,000, on a Mac with 36 GB. The largest resident size was 3.5, 6.6 and 8.1 GB. At 100,000 files the footprint was 2.0 times the resident size, because the footprint counts memory macOS had compressed. Reading the resident figure alone would have hidden that.
Reuse in run 1. Building again over the finished index took 13.8 s at 10,000 files, against 136.0 s cold. The rebuild at 30,000 files is in the table, marked contended, and its time is not used here.
Text in run 1. In the index test, 96 of the 10,000 files, 270 of the 30,000 and 1,030 of the 100,000 produced a document with an empty text body, about one in a hundred. After the full scan, which ran OCR on 144 documents, 0 of the 10,000 did.
Run 1: a full scan over 10,000 files
| Step | Files | Total | OCR | Python pipeline | Word index | Largest resident | Peak footprint | The Mac | Raw |
|---|---|---|---|---|---|---|---|---|---|
| Check run | 726 | 68.5 s | 48.8 s | 10.4 s | 9.3 s | 3.0 GB | 3.4 GB | quiet (other CPU 132%) | log |
| Full scan | 10,000 | 452.7 s | 190.5 s | 118.9 s | 143.3 s | 5.1 GB | 4.0 GB | quiet (other CPU 167%) | log |
The check run shows the scan's stages and its run journal work on a small folder before the long run starts. It is not a measurement. The full scan ran over its own copy of the first 10,000 files.
The full scan took 452.7 s over 10,000 files: 190.5 s of OCR, 118.9 s in the Python pipeline and 143.3 s building the word index. It peaked at 4.0 GB of footprint. The scan was held to its own copy of the files, and the run checked that no file outside it was touched: it found 0.
The 100,000 file build in all four runs
| Run | Harness app | Build time | Longest silence | Peak footprint | Largest resident | Swap in use at the start | Other CPU | Pages out | The Mac | Raw |
|---|---|---|---|---|---|---|---|---|---|---|
| Run 1, 2026-10-28, night | original | 2,534.3 s | 1,005 s | 16.5 GB | 8.1 GB | 10.1 GB | 156% | 7,375 | quiet | log |
| Run 2, 2026-10-29, night | original | 2,075.7 s | 1,014 s | 7.8 GB | 8.6 GB | 15.2 GB | 39% | 216 | quiet | log |
| Run 3, 2026-10-29, afternoon | signed again | 1,197.6 s | 40 s | 8.3 GB | 8.2 GB | 16.3 GB | 124% | 10,443 | quiet | log |
| Run 4, 2026-10-30, night | signed again | 3,503.0 s | 273 s | 4.3 GB | 4.8 GB | 16.7 GB | 264% | 21,415 | contended | log |
Each row is the cold build of 100,000 files in one run. Harness app says which copy ran: the build as it came, or the copy with its signature redone. Swap in use at the start is how much of the Mac's swap was holding data when the step began. The one row not in italics passes all our tests: quiet by our line, and no silence over 90 s.
Build time at 100,000 files was 2,534, 2,076, 1,198 and 3,503 s in runs 1 to 4. Runs 1 and 2 each include one silence of about 17 minutes (1,005 and 1,014 s), so neither time is a measurement of the build.
Run 4 is marked contended: other processes averaged 264 percent of one core, 21,415 pages went out, and 16.7 GB of swap was in use at the start. Every cold build in run 4 took 2.6 to 2.9 times as long as the same build in run 3, at 10,000, 30,000 and 100,000 files, and its longest silence at 100,000 files was 273 s.
Run 3 is the only build at this size that passes all our tests, and it took 1,197.6 s. It ran in the afternoon, while other work went on, with 16.3 GB of swap already in use. The line we drew for quiet does not look at swap. We show the time as one observation. It is not a range, and it is not the time.
The footprint of the same build over the same files was 16.5, 7.8, 8.3 and 4.3 GB. We held nothing else fixed between runs, so we do not know why it moved.
Rebuilding over the finished index at 100,000 files took 190.4, 180.2, 205.2 and 229.2 s in runs 1 to 4.
The silences
| Run | Step | Silent for | Began | Files done, at the start and at the end | The Mac | Raw |
|---|---|---|---|---|---|---|
| Run 1, 2026-10-28, night | 100,000 files, cold build | 1,005 s | 704 s in | 47,562 to 47,836 | quiet (other CPU 156%), silent 1,005 s | log |
| Run 2, 2026-10-29, night | 100,000 files, cold build | 1,014 s | 480 s in | 46,401 to 47,806 | quiet (other CPU 39%), silent 1,014 s | log |
| Run 4, 2026-10-30, night | 10,000 files, cold build | 145 s | 4 s in | 2,038 to 2,283 | quiet (other CPU 153%), silent 145 s | log |
| Run 4, 2026-10-30, night | 30,000 files, cold build | 195 s | 913 s in | 23,194 to 24,967 | quiet (other CPU 218%), silent 195 s | log |
| Run 4, 2026-10-30, night | 100,000 files, cold build | 273 s | 1,774 s in | 52,791 to 54,676 | contended (other CPU 264%), silent 273 s | log |
Every step in the four runs whose longest gap between heartbeats was over 90 s. The harness writes a heartbeat every 15 s, so a gap this long means the build wrote nothing for that time. All 21 other steps stayed under it.
The two long silences, in runs 1 and 2, lasted 1,005 and 1,014 s. They began with 47,562 and 46,401 files done, and the build carried on from there without anything we did.
In both, the app's own system log has one "Caller wants reinitialization" line from LaunchServices, the macOS service that keeps the list of installed apps, and one LaunchServices database notification 1,000 and 1,001 s after it. Those match the silences to within 13 s. The first line appears from the app nowhere else in the four runs. The lines are in each run's system-log.txt.
That fits the build having waited on whatever began with that line. Runs 5 and 6, below, show what the same line came from once. The original harness app also logs a failing bookmark check, "resolveBookmark failed", about every 91 to 94 s: 19 times in run 1's 100,000 file build and 16 in run 2's. In both long silences it went missing for 1,076 and 1,078 s, about 11 and 12 times its usual spacing, and came back afterwards. That fits the whole app stopping. It does not say which call was stuck.
The re-signed copy logged that check no times in runs 3 and 4. So those two runs never made the call, and they cannot show that removing the stale registrations or redoing the signature mattered. We do not call anything fixed.
Run 4 has three shorter silences, 145 s at 10,000 files, 195 s at 30,000 and 273 s at 100,000. Its system log has no LaunchServices line like the others. Our capture sampled the Mac during them 10 times. Every time it was nearly out of memory: between 0.08 and 1.30 GB of its 36 free, 10.6 to 14.8 GB held by the memory compressor, and 16.7 to 17.0 of 18 GB of swap in use. The app was running at 407 to 632 percent of one core, mostly in macOS text recognition and PDF parsing, and files done rose by 245, 1,773 and 1,885 during the three silences. The heartbeat runs on a low priority thread. In that state it went minutes without a turn while the build kept going. We read these as a starved heartbeat on a memory-starved Mac, not a build waiting on LaunchServices. We ran no control, so that is a reading and not a proof.
Runs 5 and 6: what one silence waited for
| Run | Build | Build time | Longest silence | Files done when it began | Peak footprint | Swap in use at the start | Other CPU | Pages out | The Mac | Raw |
|---|---|---|---|---|---|---|---|---|---|---|
| Run 5, 2026-11-01, night | first | 1,124.3 s | 88 s | 12,321 | 3.1 GB | 17.5 GB | 93% | 176 | quiet | log |
| Run 5, 2026-11-01, night | second | 1,745.7 s | 612 s | 48,535 | 4.0 GB | 17.3 GB | 147% | 3,928 | quiet | log |
| Run 6, 2026-11-08, early morning | first | 1,252.3 s | 137 s | 47,505 | 7.2 GB | 7.6 GB | 68% | 477 | quiet | log |
| Run 6, 2026-11-08, early morning | second | 1,215.0 s | 96 s | 84,233 | 9.9 GB | 7.5 GB | 127% | 1,752 | quiet | log |
Each row is a cold build of 100,000 files. Three went silent for more than 90 s and the fourth came within 2 s of it, so none of their times is used as a measurement. They are here for what happened during them.
Runs 5 and 6 used a copy of the original harness app with its own bundle identifier, so that LaunchServices kept a separate record for it. Every build finished, indexed every file, and was quiet by our line. Before its two builds, run 5 built a window of 7,772 files, folders 300 to 329, in 82.0 s, and no gap between heartbeats was over 32 s.
Run 5's second build went silent for 612 s, starting with 48,535 files done. The capture stopped at 4 per step then, and it had spent them on two shorter silences earlier in that build (291 and 209 s), so nothing recorded what the app was doing in the long one. Its system-log.txt is empty because macOS had cleared most of that night's log by the time we took it, a week later, so it says nothing either way.
Run 6's first build went silent for 137 s, starting with 47,505 files done. A capture ran 50 s into it. The app was using no CPU. 12 index threads were waiting on the macOS font registry while reading the text of a PDF, and one more had asked macOS to download a font and was waiting for the answer. 12 of the 14 PDF files the app had open were in folder 313. One of them, 313822.pdf, names the font Osaka without including it, and Osaka was not on this Mac.
The system log puts the rest in order. The build fell silent at 06:43:30. 4 s later the app logged its LaunchServices line, "Caller wants reinitialization", and 28 ms after that macOS started its font download helper, which puts up a dialog asking whether to download a missing font. We were at the Mac and clicked to download Osaka at 06:45:43. The build carried on 3 s later, as the font arrived, and the app's LaunchServices database notification fired in the same second. The lines are in system-log.txt and font-helper.txt.
That pair of lines, the reinitialization when the silence begins and the database notification when it ends, is the pair around the two long silences in runs 1 and 2. There they were about 1,000 s apart, overnight with nobody at the Mac, and those silences began with 47,562 and 46,401 files done. We think they were this dialog too, waiting until it closed. macOS had cleared the log that would show its helper starting before we knew to look, so that is a reading and not a proof.
The dialog did not hold up every build that read 313822.pdf. Run 6's second build came after Osaka was on the Mac and went past that point quietly. Its 96 s silence, later, had no font helper, and we do not know what it waited for. Run 3 and run 5's first build went past that point with no silence over 90 s, and run 5's window, which holds the file, had none over 32 s. Run 4 had a 91 s silence there, beginning with 46,271 files done, on a Mac short of memory, so we cannot tell what it was. We do not know why the dialog held some builds for minutes and others not at all.
Read alone, with Osaka removed from the Mac again, 313822.pdf brought the dialog up three times out of three. In the harness the one file took 278.6 s, until someone clicked Skip. The same file with the font's name changed to Jaini, another font macOS downloads on request, took 0.2 s and brought up no dialog. A small test app that reads the file with PDFKit waited 6.4 and 3.0 s, the time it took to click Skip. The logs and the test app's source are in repro.
We tried the obvious switch. macOS lets an app turn off fonts activating on their own, with a call named CTFontManagerSetAutoActivationSetting. The harness run above had it set to disabled for the harness app, and the test app set it for itself before reading the file in the first of its two runs. The dialog came up anyway, both times. We have not found a setting that stops it. Run 7, below, tried a fix in the app instead.
How often it can happen. Our scan of all 100,000 files found 4 that name a font macOS downloads on request: 3 name Osaka and one names LiSungLight. We checked each by hand, and 313822.pdf is the only one that leaves its font out. The scan reads raw bytes, so it cannot see inside the 14,230 files that store their contents compressed. The scan, its output and the hand check are in font-scan.
Run 7: a build with a fix
| Run | Build | Build time | Longest silence | Files done when it began | Peak footprint | Swap in use at the start | Other CPU | Pages out | The Mac | Raw |
|---|---|---|---|---|---|---|---|---|---|---|
| Run 7, 2026-11-09, early morning | first | 1,186.5 s | 74 s | 64,351 | 10.3 GB | 5.4 GB | 124% | 3,609 | quiet | log |
| Run 7, 2026-11-09, early morning | second | 1,317.6 s | 84 s | 86,418 | 8.8 GB | 5.4 GB | 91% | 4,942 | quiet | log |
Each row is a cold build of 100,000 files on the build with the fix, with Osaka not on the Mac. Both were quiet and neither went silent for more than 90 s. One run is not enough to say anything about speed, so the times are here for completeness.
Run 7 used Bibliome's source as of 8 November with the fix, the same harness, and a copy with its own bundle identifier. Osaka was not on the Mac: the queue checked before it started and again between the two builds, and would have stopped if it had been there.
macOS did not start its font download helper at any point in the run, and nothing asked for a font. font-helper.txt is the same query as run 6's over the run's hours, and it returned no lines. So that an empty answer means something, the same hours of the log hold 1,241 lines of launchd starting other services. The app's system log has no LaunchServices reinitialization line.
Both builds went past 47,505 files, where run 6's first build stopped, with no gap over 15 s. Their longest silences, 74 and 84 s, began with 64,351 and 86,418 files done, far from that point. Run 6's second build had a 96 s silence away from it too, with 84,233 files done, so a silence of this size is not new.
Each finished index holds the same text for 313822.pdf, 35,341 characters, as both of run 6's, which read it after Osaka was downloaded. No file was left unread. The figures are in index-check.txt.
The capture ran 6 times, each when the log had gone 45 s without a line. None found a thread waiting on the font registry. In run 6's capture inside its silence, 12 threads were waiting there. In 4 of run 7's captures the app was using 1,102 to 1,124 percent of one core, busiest in macOS text recognition. In the other 2, which came after a build had finished, it was reading the index for the check and the timed searches. The figures are in captures.txt.
How busy the Mac was
21 of the 26 steps stayed under our line for quiet, with other processes averaging between 31 and 228 percent of one core. 5 did not: the rebuild at 30,000 files in runs 1, 3 and 4, the rebuild at 100,000 files in run 3, and the cold build at 100,000 files in run 4. Each is marked contended in the tables, and no statement on this page rests on its time. No step slept.
The build and the runs
The files: GovDocs1 (digitalcorpora.org), nested roots R010, R030 and R100, each the first part of the next. The files and the index both sat on one external drive.
Run 1, queue Q1026-2300, started 2026-10-28 02:03, finished 05:59 (the first step began at 02:29, after the queue waited for a quiet Mac). The build: Bibliome 1.9.0 (95), a Release build of the shipping source (release/1.9.0-b95, 49e3d985) plus the measurement harness (5fa54b7e, a branch that is not part of the app), with an ad-hoc signature that does not match its contents, run with no window open.
Run 2, queue Q1028-2300, started 2026-10-29 05:14, finished 07:05. The build: Bibliome 1.9.0 (95), the same build and the same harness app as the first run, untouched. Its signature does not match its contents.
Run 3, queue D1029-day, started 2026-10-29 14:17, finished 15:42. The build: Bibliome 1.9.0 (95), the same build as the first run, in a copy of the harness app signed again so that its signature covers its contents. Run in the afternoon, to see whether the long silence came back, while other work was going on on the Mac.
Run 4, queue Q1029-2300, started 2026-10-30 23:38, finished 2026-10-31 01:51. The build: Bibliome 1.9.0 (95), the same build as the first run, in the copy of the harness app signed again.
Run 5, queue L1101-2312, started 2026-11-01 23:12, finished 2026-11-02 00:18. The build: Bibliome 1.9.0 (95), the same build, in a byte-for-byte copy of the original harness app given its own bundle identifier, so LaunchServices keeps a separate record for it. Steps: the index tier only: first a window of 7,772 files (folders 300 to 329 of the 100,000), then the 100,000 files built from nothing twice. Captures: at most 4 per step.
Run 6, queue L1108-0632, started 2026-11-08 06:32, finished 2026-11-08 07:21. The build: Bibliome 1.9.0 (95), the same build, in the same copy with its own bundle identifier as run 5. Steps: the index tier only: the 100,000 files built from nothing twice. Captures: at most 24 per step.
Run 7, queue F1109-0501, started 2026-11-09 05:01, finished 2026-11-09 05:57. The build: Bibliome's source as of 2026-11-08 with the font fix added, plus the same harness, in a copy with its own bundle identifier. The source still calls itself 1.9.1 (105) and holds changes made since that release. Osaka was not on the Mac, and the queue would not start if it was. Steps: the index tier only: the 100,000 files built from nothing twice. Captures: at most 24 per step.
Quiet and contended: a step is quiet if other processes averaged under 250 percent of one core (this Mac has 12) and fewer than 20,000 pages went out; above that it is contended and kept; above 800 percent or 100,000 pages it is run again. The Mac was held awake for the whole queue and no step slept.
The tables as files: run 1: runs.tsv · queries.tsv · meta.json · system-log.txt · run 2: runs.tsv · queries.tsv · meta.json · system-log.txt · run 3: runs.tsv · queries.tsv · meta.json · system-log.txt · run 4: runs.tsv · queries.tsv · meta.json · system-log.txt · run 5: runs.tsv · queries.tsv · meta.json · system-log.txt · run 6: runs.tsv · queries.tsv · meta.json · system-log.txt. queries.tsv holds six searches timed after each step. Run 6 also: font-helper.txt · capture-in-silence.txt · font-scan/scan_fonts.py · font-scan/scan-output.txt · font-scan/R100-macos-download-fonts.tsv · font-scan/checked-by-hand.tsv · repro/FR-osaka-disabled.log · repro/FR-jaini-default.log · repro/font-helper.txt · repro/probe-runs.txt · repro/probe.swift · repro/fontsetting.swift. Run 7: runs.tsv · queries.tsv · meta.json · system-log.txt · font-helper.txt · index-check.txt · captures.txt.
What this shows
It finishes
All 26 steps in the four runs, up to 100,000 files, built what they were asked to build, processed every file they found, and hit no error.
It can go silent for a quarter of an hour
In two of the four builds at 100,000 files the build wrote nothing for about 17 minutes, with between 46,401 and 47,836 files done, and then carried on and finished. In both, the app's system log shows one LaunchServices line when the silence began and another about 1,000 s later when it ended. The first of those lines, "Caller wants reinitialization", does not appear from the app anywhere else in the four runs. Run 6 caught one silence as it happened, and the next point says what it was.
One silence was a font dialog
In run 6 a build of 100,000 files went silent for 137 s, starting with 47,505 files done, about where the long silences began. A capture inside it found the app using no CPU, 12 index threads waiting on the macOS font registry, and one more waiting for the answer to a download request. 28 ms after the app's LaunchServices line, macOS started the helper that asks whether to download a missing font, here Osaka, which one file names and does not include. We clicked to download it. The build carried on 3 s after the download began, and the app's LaunchServices database notification fired in the same second. Read alone, with Osaka removed from the Mac again, that one file held the build for 278.6 s, until someone clicked Skip.
A build with a fix did not wait
In run 7, on a build with the fix and with Osaka not on the Mac, macOS never started its font download helper. Both builds went past the point where run 6 stopped, 47,505 files, with no gap over 15 s, and finished with longest silences of 74 and 84 s, under our line. Every index from runs 6 and 7 holds the same 35,341 characters of text for the file that names Osaka, and run 7 left no file unread.
The time at 100,000 files is not settled
The four builds took 1,198 to 3,503 s. Two include the long silence and one ran while the Mac was busier than our line for quiet. One passes all our tests, at 1,197.6 s, on a Mac that already had 16.3 GB of swap in use. We give that as one observation. Ten times the files took 10.6 times as long in that run, more than ten and far less than a hundred.
Memory moved a lot between runs
The peak footprint of the 100,000 file build was 16.5, 7.8, 8.3 and 4.3 GB in runs 1 to 4, for the same build and the same files. The first is more than a Mac with 16 GB of memory has. The others are less. We cannot say which a 16 GB Mac would see.
Building again reuses the work
A rebuild over a finished index took a small fraction of the time of the first build. At 100,000 files it took 180 to 229 s in the four runs, less than a fifth of the fastest cold build, and used a fraction of the memory.
A full scan costs more than the index alone
At 10,000 files the scan took several times as long as building the index, and OCR was the largest share of it. This is from run 1.
What this does not show
Government documents, not your library
The files come from US government web sites. A library of scans, books, manuals or slide decks has a different cost per file, and we did not test one. The index here came to about 88 KB per file at 10,000 files and about 85 KB at 100,000.
The index and a scan, not the whole app
The index test built only the search index. The scan test ran OCR, the Python pipeline and the word index over 10,000 files, not 100,000, in run 1 only. Neither ran the meaning index or AI Classify, and neither measured answering questions at this size. A person's first scan includes more than these steps, so their time will be longer.
The meaning index is left out
On an earlier build, a first attempt to time the meaning index over 10,000 files was still writing its database after six hours on a busy Mac, and was stopped at its time limit. It is left out of every figure on this page, and the page makes no claim about how long it takes.
One Mac
An Apple M3 Pro with 12 cores and 36 GB of memory, running macOS 27.0.1 for run 1 and 27.2 for the rest. The files and the index sat on one external drive, and the app's data folder was moved there for the test, so a Mac that keeps its library on its internal drive may be faster or slower. A Mac with 8 or 16 GB has less room than this one, and we did not test a smaller Mac.
Only one silence is explained
We saw the cause of one silence, in run 6. The two long ones, in runs 1 and 2, carry the same pair of LaunchServices lines around a silence that began at about the same point in the files, overnight with nobody at the Mac. That fits the same dialog waiting 1,000 s until it closed. It is not proof, because macOS had cleared the log that would show its font helper starting before we knew to look. Run 5's long silence, 612 s, had no capture inside it, and most of that night's log is gone too. Run 6's second silence, 96 s, came after Osaka was on the Mac and had no dialog, and we do not know what it waited for. Nor do we know why the dialog held up some builds that read the file and not others (see Results). We tried the obvious switch, a macOS setting that tells an app not to activate fonts on its own, and the dialog came up anyway. The fix in run 7 is a different change, in the app, described under Method. The re-signed copy never makes the failing bookmark check that the original app makes about every 91 to 94 s, so runs 3 and 4 cannot show whether the changes under Method mattered, and we do not claim they did. Run 4 had shorter silences of 145, 195 and 273 s. Its system log has no "Caller wants reinitialization" line, and every one of the 10 captures we took during them found the Mac nearly out of memory with the swap nearly full (those captures are not published). We read those silences as a starved heartbeat on a memory-starved Mac. We ran no control, so that is a reading and not a proof.
Run 7 is one run of a newer build
Run 7 ran once, two builds, on source newer than runs 1 to 6 in more ways than the fix, so it does not isolate the fix. It shows that the dialog did not come up and that no build waited at that file. Its times, 1,186.5 and 1,317.6 s, sit with the others, and we make no claim about speed. Its 6 captures, each taken when the log had gone 45 s without a line, found no thread waiting on the font registry, where run 6's found 12. In 4 of them the app was using 1,102 to 1,124 percent, busiest in macOS text recognition, and in the other 2, after a build, it was reading the finished index. On 9 November the fix was not in a released version of Bibliome, and the version on the App Store did not have it.
The runs were not alike
Only the 100,000 file build was repeated, and the four runs differ in the time of day, how busy the Mac was, how much swap was in use, the macOS version and the signature of the harness app. No pair of them isolates one of these. The table under Results gives the figures for each. Runs 5 and 6 add a third copy of the harness app and two more runs' worth of differences.
Some runs are not on this page
Two more builds of 100,000 files on the original harness app were made in the same days for a separate memory test, with a macOS memory option switched on, so their memory figures are not comparable and they are left out. They made the failing bookmark check 16 and 18 times, and neither had a silence longer than 207 s.
Quiet is a line we drew
The line between quiet and contended, 250 percent of other processes' CPU, is ours. We chose it from earlier runs on this Mac, before the first run. A step just over it, like the rebuild at 30,000 files in run 1 at 254 percent, is only a little busier than a step just under it, and we marked it anyway.
One build of one version
Runs 1 to 6 are Bibliome 1.9.0 (95) plus the harness, and run 7 is newer source with the fix. A released version may differ, and we did not measure one.
Our own runs
These are results from our own runs of our own app. The logs are published so that you do not have to take them on trust.
Run it yourself
Get the files
GovDocs1 is free to download from digitalcorpora.org as zip files of about a thousand documents each, of mixed types. Keep the PDFs and put them in one folder, then make smaller folders from the first part of it. On a Mac, cp -c makes an APFS clone, which costs almost no disk.
cp -c -R govdocs-10k scan-copy
Check the count
find library -name '*.pdf' | wc -lA test that read a different number of files than you meant is the commonest way to get a result that means nothing.
Time a build
Point Bibliome at the folder and let it index. Wrap a command-line run in /usr/bin/time -l to get the resident size and the peak footprint, or read the Memory column of Activity Monitor. The app's own scan does more than the index build the tables cover, so your time will be longer than ours, and that is expected.
Check how busy your Mac is
Close what you can and watch the CPU tab of Activity Monitor while it runs. If something else is using several cores, the time you get is not the build's alone. Run it again when the Mac is idle, and keep it awake.
Watch for a silence
A build that goes quiet for minutes and then finishes looks the same in a final time as one that was slow. Note when the progress stops moving. If it does, the system log may say what the app was waiting for:
/usr/bin/log show --last 30m --style compact --predicate 'process == "Bibliome" AND eventMessage CONTAINS "LaunchServices"'
Read your logs with ours
python3 -I extract-scale.py ./logs ./out --queue MYRUNThe extractor reads the harness's own lines and the time block from every
MYRUN-*.log in the folder, and the conditions file beside them. It prints STALLED for a step with a silence over 90 seconds. A log in another format needs its own reading.If yours differs
If your result is not ours, send the numbers to info@psychosonicconsulting.com and we will look.
The Lab
Bibliome is made by Psychosonic Consulting. Apple, Mac, macOS and APFS are trademarks of Apple Inc. GovDocs1 belongs to its maintainers at digitalcorpora.org, and the files in it come from US government web sites. None of them is affiliated with or endorses this page.
The Signal
A short note on building privacy-first software, plus the day each new app ships. No spam, unsubscribe anytime.
Free · ~1 email a week · your address stays yours · RSS feed