Review the whole codebase (about 105,000 lines of Swift under Sources/ and ios/) and record findings as separate issues.
Speed
- Launch to first editable frame, Mac and iPhone, cold and warm.
- Opening and typing in large files (1 MB, 10 MB): parse, incremental reparse, highlighting, folding, table alignment.
- Index build and rebuild for a large folder (10,000 files); cost of a single-file change.
- Agenda build for day, week, month and block views; text search and Search Notes latency.
- Save, external-change detection and conflict checks on iCloud Drive and Syncthing folders.
- Export (HTML, PDF, LaTeX, ODT, Word) and tangling on long documents.
- Widgets, the watch app and the Live Activity: timeline reload cost and memory.
- Re-run the gates in
docs/plans/2026-10-04-performance.mdand compare with the earlier numbers.
Memory and energy
- Peak and steady memory with several large buffers open; leaks and retain cycles (Instruments).
- Background work on iOS: file watching, indexing, notification scheduling.
- Main-thread hangs over 100 ms.
Size
- App bundle and download size per target (Mac download, Mac App Store, iOS, watch, extensions).
- What each bundled resource costs: tree-sitter grammars, MathJax, fonts, themes, string catalogs.
- Code linked into extensions that don't need it (Quick Look, Spotlight, Share, widgets).
- Build time, clean and incremental.
Code quality
- Module boundaries: what OrgCore, OrgDocument, OrgIndex, OrgApp and the app targets depend on, and anything platform-specific that has leaked into shared modules.
- Duplicate code between the Mac and iOS targets that belongs in a shared module.
- Dead code, unused commands and settings, stale
OrgstarSpikecode. - Concurrency: actor isolation,
@unchecked Sendable, unstructured tasks, data races under Swift 6 strict checking. - Error handling: swallowed errors,
try?and force unwraps on paths that touch user files. - Test coverage by module, slow tests, and tests skipped when Emacs is missing.
- Compiler warnings and code scanning findings still open.
Output
- A dated report in
docs/next toreview-2026-10-05.mdandreview-2026-10-13.md, with measurements and the device and OS they were taken on. - One issue per finding worth fixing, linked from this one.
referenced in commit 9cf7ae99af by cmc: Add the performance review report
2026-11-22 07:09 UTC