Psychosonic Lab · Experiment 11
How fast is a key typed into a note?
Notesmith for Mac times every key you type and writes the result to a log on your Mac. We read that log on the developer's own Mac, in a library of about 1,400 notes, across three builds made before Mac 1.2 came out. In the large list the median key took 443 to 445 ms in build 85 and 49 ms in build 86. The script below prints the same lines from your own log.
The question
What is being asked
In a library of about 1,400 notes, is the median key typed into a note drawn in under 50 milliseconds?
Why it matters
A key that arrives a beat late feels like a heavy keyboard. Notesmith's log used to record only freezes of 300 milliseconds or more, so a key that took 60 left nothing to read. In early November the developer felt typing was a little behind, and there was no number to say by how much.
What counts as under 50 milliseconds
Fifty milliseconds is where the log starts counting a key as slow, well past one frame at 60 Hz. The timer runs from the moment macOS stamps the key to the end of the pass that draws it. It leaves out the display's own delay of about a frame, which is the same for every build.
Method
The timer
Notesmith for Mac times each key typed in a note. It reads the system's own timestamp on the key event and stops the clock when the last observer of the run loop pass that handled the key fires, after AppKit has drawn and Core Animation has committed. For every 200 keys it writes one line to the log: the median, the slowest 5%, the worst key, how many keys took 50 ms or more, and the Mac's load average. A line holds counts and durations only. No character, key code or note is ever written.
The library and the Mac
The developer's own notes: about 1,400 notes and 57,285 blocks when last counted, with pictures, tags and colours, on a MacBook Pro, Apple M3 Pro, 36 GB. The Mac was in ordinary use with other work running, which is why every line carries the load average.
Real window, real library
The results are from the real app in a real window, typing into the real library. Tests in code, run against a copy of the same library, had said a key costs about 10 ms once the editor's own costs were fixed. Build 85 carries those fixes and the real window said 443 to 445 ms in the large list. The tests measured the editor. They could not see the list beside it, which was most of the time.
Counting what runs
To find where the time went we did two things. We sampled the main thread of the signed build while typing, with macOS's sample tool. And we built a bench: a debug build holding 1,400 made-up notes, with a script typing 150 keys through the real text view, counting how many times the window's main view and a note row were rebuilt.
One change at a time, with a test
Each change had a test written for it, and we checked that the test fails when the change is taken out. Each build was then installed on the same Mac and typed in. The builds are the rows of the results.
Materials
The script
One file of Python, 96 lines, standard library only. It reads Notesmith's log and prints the typing lines by build, or as CSV. It is shown in full below with its checksum. It changes nothing.
The data
performance-excerpt.log is the developer's log, unchanged, cut to the launch, typing and freeze lines of builds 82, 85 and 86. typing.csv is what the script makes of it. lists.csv says which list was open for each line, written from the developer's account because the log does not record it. meta.json holds the build notes, the sampling summary and the bench's two runs.
Show the script in full
#!/usr/bin/env python3
"""Read the typing lines Notesmith for Mac writes to its own performance log.
Notesmith times every key you type in a note, from the moment macOS stamps the key
event to the end of the pass that draws it, and writes one summary line for every 200
keys. A line holds counts and durations only, never a character, a key code or a note.
This script lists those lines, grouped by the build that wrote them.
python3 typing-lines.py # your log, every build
python3 typing-lines.py --csv > typing.csv # the same, as a spreadsheet
python3 typing-lines.py PATH/performance.log # a log you copied somewhere
Standard library only. It reads the log and changes nothing.
"""
import argparse
import csv
import os
import re
import sys
# Notesmith for Mac is sandboxed, so its log is inside its container.
DEFAULT_LOG = os.path.expanduser(
"~/Library/Containers/com.langberg.privatenote/Data/Library/Application Support/"
"PrivateNote/performance.log")
LAUNCH = re.compile(r"^(\S+)\s+launch (\S+) \((\d+)\)")
TYPING = re.compile(
r"^(\S+)\s+typing · (\d+) keys · p50 (\d+)ms p95 (\d+)ms max (\d+)ms · (\d+) over 50ms"
r"(?: · load ([\d.]+))?")
HANG = re.compile(r"^(\S+)\s+HANG (\d+)ms\s+@ (.*?)(?: · load ([\d.]+))?$")
COLUMNS = ["build", "utc", "keys", "p50_ms", "p95_ms", "max_ms", "over_50ms", "load"]
def read(path):
"""Yield (kind, row) for each launch, typing and hang line, in file order."""
build = "before the first launch line"
with open(path, encoding="utf-8", errors="replace") as f:
for line in f:
line = line.rstrip("\n")
m = LAUNCH.match(line)
if m:
build = f"{m.group(2)} ({m.group(3)})"
yield "launch", {"build": build, "utc": m.group(1)}
continue
m = TYPING.match(line)
if m:
yield "typing", {"build": build, "utc": m.group(1), "keys": int(m.group(2)),
"p50_ms": int(m.group(3)), "p95_ms": int(m.group(4)),
"max_ms": int(m.group(5)), "over_50ms": int(m.group(6)),
"load": m.group(7) or ""}
continue
m = HANG.match(line)
if m:
yield "hang", {"build": build, "utc": m.group(1), "ms": int(m.group(2)),
"where": m.group(3), "load": m.group(4) or ""}
def main():
ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
ap.add_argument("log", nargs="?", default=DEFAULT_LOG, help="a performance.log (default: Notesmith's own)")
ap.add_argument("--csv", action="store_true", help="write the typing lines as CSV")
ap.add_argument("--since", default="", help="only lines from this UTC date on, like 2026-11-04")
args = ap.parse_args()
if not os.path.exists(args.log):
sys.exit(f"no log at {args.log}. Notesmith writes one once you have typed in a note.")
rows = [(k, r) for k, r in read(args.log) if r["utc"] >= args.since]
typing = [r for k, r in rows if k == "typing"]
if args.csv:
w = csv.DictWriter(sys.stdout, fieldnames=COLUMNS, lineterminator="\n")
w.writeheader()
w.writerows(typing)
return
if not typing:
sys.exit("the log has no typing lines yet. A line is written for every 200 keys typed in a note.")
current = None
for kind, r in rows:
if kind == "typing":
if r["build"] != current:
current = r["build"]
print(f"\nNotesmith {current}")
print(f" {'UTC':<21}{'keys':>5}{'p50':>8}{'p95':>8}{'max':>8}{'over 50':>9}{'load':>7}")
print(f" {r['utc']:<21}{r['keys']:>5}{r['p50_ms']:>6}ms{r['p95_ms']:>6}ms{r['max_ms']:>6}ms"
f"{r['over_50ms']:>9}{r['load']:>7}")
hangs = [r for k, r in rows if k == "hang" and "typing" in r["where"]]
if hangs:
print(f"\n{len(hangs)} time(s) the main thread was blocked for 300 ms or more while you typed:")
for r in hangs:
print(f" {r['utc']} {r['ms']} ms build {r['build']}")
if __name__ == "__main__":
main()
Results
Every typing line the log holds for these builds
| Build | Written (UTC) | List | Keys | Median key | Slowest 5% | Worst key | Keys 50 ms or more | Load |
|---|---|---|---|---|---|---|---|---|
| 1.2 (82) | 2026-11-06 02:07:01 | Not noted | 27 | 14 ms | 397 ms | 542 ms | 9 | 41.0 |
| 1.2 (82) | 2026-11-06 21:24:42 | Not noted | 109 | 523 ms | 3,094 ms | 3,861 ms | 109 | 6.7 |
| 1.2 (82) | 2026-11-06 21:30:50 | Not noted | 90 | 585 ms | 2,145 ms | 2,569 ms | 90 | 4.7 |
| 1.2 (82) | 2026-11-06 21:41:42 | Not noted | 199 | 731 ms | 8,467 ms | 11,664 ms | 186 | 27.1 |
| 1.2 (82) | 2026-11-06 21:46:23 | Not noted | 61 | 8,333 ms | 15,259 ms | 19,439 ms | 61 | 129.6 |
| 1.2 (85) | 2026-11-11 14:19:04 | Large list | 245 | 445 ms | 2,161 ms | 2,555 ms | 245 | 2.1 |
| 1.2 (85) | 2026-11-11 14:19:09 | Large list | 52 | 443 ms | 885 ms | 951 ms | 52 | 2.2 |
| 1.2 (85) | 2026-11-11 14:26:14 | Not noted | 200 | 93 ms | 4,410 ms | 5,180 ms | 200 | 4.1 |
| 1.2 (85) | 2026-11-11 14:26:37 | Not noted | 94 | 95 ms | 4,552 ms | 5,257 ms | 94 | 4.3 |
| 1.2 (85) | 2026-11-11 14:27:51 | Small group | 121 | 46 ms | 126 ms | 465 ms | 38 | 3.8 |
| 1.2 (86) | 2026-11-12 23:54:40 | Large list | 200 | 49 ms | 104 ms | 190 ms | 98 | 4.1 |
| 1.2 (86) | 2026-11-12 23:55:30 | 5 notes | 200 | 48 ms | 76 ms | 214 ms | 88 | 3.6 |
| 1.2 (86) | 2026-11-12 23:55:48 | 5 notes | 96 | 45 ms | 81 ms | 103 ms | 38 | 3.6 |
Each line covers up to 200 keys. The list column is the developer's account of which list was open. The medians of build 86 are marked.
What went into each build
| Build | What was in it |
|---|---|
| 1.2 (82) | The first typing fix, which rebuilds one paragraph per key and not the whole note. None of the fixes below. |
| 1.2 (85) | Six more: sync stopped asking the system for its peer list on the main thread, an empty sync round did nothing, a screen redraw that changed nothing rebuilt nothing, a key re-read one block's references and not every block's, the list re-read only the notes that changed, a long note's key walked one paragraph and not all of them. And two more: the list worked out the attachments folder once and not once per row per key, and the language model and the font list stopped loading on the main thread. |
| 1.2 (86) | The note list in a view of its own, so a key typed in the editor no longer rebuilds the list. |
Blocked for 300 ms or more while typing
| Build | Typing lines | Keys | Times the main thread was blocked |
|---|---|---|---|
| 1.2 (82) | 5 | 486 | 8 |
| 1.2 (85) | 5 | 712 | 2 |
| 1.2 (86) | 3 | 496 | 0 |
Counted from the freeze lines in the log that name typing. How long each build was used differs, so these are a sign, not a rate.
The bench, a debug build with made-up notes
| Median key | Slowest 5% | Worst key | Keys 50 ms or more, of 150 | Times the main view was rebuilt | Note rows rebuilt | |
|---|---|---|---|---|---|---|
| Before: rows built inline | 189 ms | 705 ms | 1,099 ms | 142 | 486 | 1 |
| After: rows in a view of their own | 50 ms | 96 ms | 112 ms | 74 | 384 | not counted |
1,400 made-up notes, 150 keys typed through the real text view by a script, 120 ms apart. A debug build is slower than the app you install, and the real library has pictures, tags and colours, so the real lag was larger than the bench showed: 445 ms in the large list against 189 ms. The bench's own log was overwritten by later runs, so these two rows have no raw file.
Where the time went in build 85
Sampling the signed app while typing in the large list: the main thread was busy 91 to 99% of the time. The list's own ForEach took 34 to 39% of it and SwiftUI's list machinery 28 to 34%. The text editor took 3 to 4%. One sitting; the sampling output is not published.
What this shows
Build 82 was more than half a second behind
In build 82 the median key in each of the three longer stretches of typing took 523 to 731 ms.
Build 85 left the large list behind
In build 85 the median key in the large list took 443 to 445 ms, while the same build in the small group took 46 ms.
Build 86 closed the gap
In build 86 the median key in the large list took 49 ms, and 45 to 48 ms in a group of five notes. The slowest 5% in the large list went from 885 and 2,161 ms in two lines of build 85 to 104 ms.
Nothing long blocked typing in 86
The main thread was blocked for 300 ms or more while typing eight times in build 82, two times in build 85 and not once in build 86. Those counts depend on how long each build was used.
The list was rebuilt three times a key
In the bench the window's main view was rebuilt 486 times in 150 keys, about three a key, and a note row once. The rows were skipped, but each rebuild still made SwiftUI walk the identity of all 1,400 notes, which sampling put at about a third of the main thread. Putting the list in a view of its own took the bench's median key from 189 to 50 ms.
What this does not show
One person, one Mac, one library
Everything here is one developer's library on one MacBook Pro, Apple M3 Pro, 36 GB. A smaller library will not show the large list's lag, and a different Mac may differ.
A few lines
There are 13 lines and 1,694 keys, typed in sittings of a few minutes. This is a handful of measurements.
The Mac was busy
Every line has a load average, from 2 to 130. The developer was running other work on the same Mac, so these are numbers for a busy machine. A quiet Mac would likely do better, and build 82's last line, a median of 8,333 ms at a load of 130, is mostly that.
Which list was open comes from memory
The log does not record the list. Where a line says large or small, that is the developer's account of the sitting. Lines marked not noted are ones nobody can place.
Several changes at once
Build 85 carried eight changes and the log cannot say which did what. Tests in code measured some of them one at a time, but that is not part of this data.
Half the keys were still near 50 ms
The 49 ms is the median, so other keys took longer. In the first large-list line of build 86, 98 of 200 keys took 50 ms or more, and the slowest 5% took 104 ms or more.
Key to drawn, not key to glass
The timer stops when the app has drawn, not when the display shows it. The display adds about one frame, the same for every build, so builds compare fairly but the figures are not the whole delay your eyes see.
The bench and the sampling are not raw data
The bench's own log was overwritten by later runs of the same tool, and the sampling output is not published. Both appear as figures from our notes of the runs. The tables of typing lines do not depend on them.
Measured before release
These lines come from three builds made before Notesmith for Mac 1.2 was released (82, 85 and 86). The released 1.2 is build 87. Its note list rows and its editor view are the same code as in build 86; what changed between them is meeting recording, notices and Writing Tools. We did not read a log from 87 itself. Versions before 1.2 do not write these lines.
Run it yourself
You need Notesmith for Mac 1.2
The typing meter is in Notesmith for Mac 1.2, from the Mac App Store. Versions before 1.2 do not have it.
Type
Open a note and type a few hundred keys. Notesmith writes one line for every 200.
Read your log
python3 typing-lines.pyIt finds Notesmith's log in its container and prints the lines by build.
--csv writes them as a spreadsheet and --since 2026-11-06 leaves out older lines.Read the columns
Median is the middle key. Slowest 5% is the time one key in twenty took or went over. Over 50 ms counts the keys at or above 50. Load is the Mac's load average when the line was written, so a high one means other work was running.
If yours differs
Send your lines to info@psychosonicconsulting.com and we will look.
The Lab
Notesmith is made by Psychosonic Consulting. Apple, macOS, SwiftUI and TestFlight are Apple's. None of them 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