perf: remove autocomplete stalls and add a measured performance study - #331
perf: remove autocomplete stalls and add a measured performance study#331Maxteabag wants to merge 6 commits into
Conversation
|
This PR is part of Peter's experiment with giving Codex a broad performance-improvement brief and evaluating the code, measured results, reproducible experiments and report it produces. The original study used Original prompt — spelling, punctuation and grammar corrected; meaning preserved
Time and token usage for the original completed study
The recorded duration is 7,289,746 ms, from approximately 02:46:19 to 04:47:49 UTC on 10 September 2026. It includes investigation, implementation, lab iterations, tests, report construction, visual checks and publication. These totals exclude this follow-up comment. Token accounting is cumulative across model calls: reused context is counted again, and 95.98% of input tokens were cache hits. The cached-input and reasoning rows are subsets, not additional tokens to add to the total. What happened
|
Open the HTML performance reportThe report is now hosted on GitHub Pages and opens directly in your browser. No download, local setup or GitHub sign-in is needed. It includes all 11 figures, the interactive statistics table and trace viewer, plus downloadable raw data and SVG figures. The live page, controls and downloads have been checked at desktop and phone widths. |
Autocomplete with 5,000 stored routines repeatedly scanned the entire catalog for each candidate, producing a measured 1,841 ms completion/dropdown operation. Building one routine-identity index reduces that median to 35 ms while preserving observed suggestions and namespace disambiguation.
The source changes also stop empty idle-queue polling, honor a saved disabled-worker setting before CLI prewarm, repair absolute diagnostic-path arguments, and bound oversized literal-cell display without truncating backend values. The long-cell change's whole-operation speedup was inconclusive in the repeated trials.
Includes a standalone HTML performance paper, 11 SVG figures, an interactive statistics/trace viewer, raw observations and reproducible PTY/database labs. The 152 formal jobs produced 1,349 observations across startup, idle CPU, completion, rendering, PostgreSQL/MySQL/MariaDB under controlled latency, SQLite/DuckDB, process workers and IPC. Experimental alternatives remain in the lab.
Validation:
9db49c2, candidate0640c96; measurement-script hashes match lab snapshot03e68b7.Explorer-focus idle CPU fell 72% in the five-second workload. Launch-and-exit CPU fell 16% with the worker disabled; a default first-refresh speedup was not established. The paper documents confidence intervals, rendering regressions in rejected prototypes, and the boundary between measured opportunities and implemented changes.