Skip to content

docs: performance + correctness-evals roadmap - #7

Draft
riwsky wants to merge 1 commit into
mainfrom
claude/performance-benchmarking-ideas-6h9kdq
Draft

docs: performance + correctness-evals roadmap#7
riwsky wants to merge 1 commit into
mainfrom
claude/performance-benchmarking-ideas-6h9kdq

Conversation

@riwsky

@riwsky riwsky commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Adds two docs capturing a deep planning pass on performance and evaluation — docs only, no code changes.

What's in here

docs/perf-and-evals-roadmap.md — findings + prioritized roadmap:

  • The AX tree walk is the dominant remaining cost: ~9 serial XPC round-trips per element (~1,800 for a 200-element screen), and every selector op (exists/tap/text/wait) pays for the full tree with full attribute projection.
  • Research confirmed (via decompiled AccessibilityPlatformTranslation) a multipleAttribute bulk request (requestType 5) that iosef can build directly and send over its existing sendAccessibilityRequest path — ~9 XPC/element → 1, no AXPTranslator-singleton thread-safety concerns.
  • Other tracks: selector-aware traversal (early-exit + projection), empirical calibration of the guessed timing constants against MCPTestApp's oracles, pasteboard+Cmd-V typing (also fixes silent non-ASCII drops), and micro wins (lazy VCS spawn, shared XPC callback queue, traversal-level --depth).
  • Evals in the LLM sense: IOSEF_PERF=1 instrumentation (XPC calls per op as a regression metric), a deterministic correctness suite (scripts/correctness.py) with per-machine baselines, a runner for the existing evals.json rubrics, and token-efficiency metrics in benchmark.py. All tracking is local JSONL/markdown.

docs/perf-and-evals-design.md — per-item designs (function signatures, spike steps, check-by-check details), research verdicts on cut alternatives (xctree's public-AX approach, WDA/XCTest snapshots, translator-concurrent walks), and sources.

Suggested first step

Land roadmap items 1–2 (perf instrumentation + correctness suite) before any optimization, capture a baseline with correctness.py --update-baseline, then gate every perf change on it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UskKrPmBjwvuKUvB1ioN3U


Generated by Claude Code

Deep pass on the remaining hot paths (AX-walk XPC storm, selector
projection, timing constants, pasteboard typing) plus an eval plan in
the LLM-evals sense: perf instrumentation, deterministic correctness
suite against the playground apps, agent-eval runner for evals.json,
and token-efficiency metrics. Includes research verdicts on the AXP
multipleAttribute bulk request (the big lever) and cut alternatives.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UskKrPmBjwvuKUvB1ioN3U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants