You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: single-file outliers from fleet telemetry — 12.5s macro-header monster + wordlist scanned as code #3188
Two file-level outliers surfaced by the v2.9.0 fleet timing telemetry (first 22 repos), both #1095-class:
darwin-xnu `EXTERNAL_HEADERS/AvailabilityInternal.h` — 12.47s in ONE file, 5× the fleet's next-worst (2.25s), brushing the 15s ReDoS-failsafe ceiling. It's the notorious ~1MB machine-generated availability-macro header: enormous line count of near-identical `#define` lines. Worth profiling which rule(s) eat it — likely a preprocessor-heavy pattern with no literal gate — and whether a generated-file heuristic (repetition ratio / single-token-shape density) should route it to a cheaper lane.
haiku `src/apps/mail/words` — 1.76s: an extension-less dictionary wordlist scanned as code. An aperture-filter / language-detection miss: pure word-per-line files with no code signals should be classified as data, not fed to the full rule pass.
Slow-file top-10s come free in every scan's `--splicing-speed` chart and are aggregated fleet-wide by population-analyses' `aggregate_fleet_timing.py` — re-rank after the full 739-repo batch completes.
Investigation: root causes measured, and one of the two is already fixed
Profiled both files on this box (galaxyscope, COMMUNITY_FREE_TIER, engine at current main). The per-phase --file-speed split plus a with/without-file subtraction give a clean breakdown. The original "preprocessor-heavy rule with no literal gate" hypothesis is wrong — neither outlier is a runaway rule.
The cost was language detection, not a rule. For a .h collision file where ecosystem gravity couldn't lock, detection fell through to the Tier 3 lexical tie-break, which runs the full 55-rule ruleset of every.h candidate (c + objective-c) across the entire 2.64 MB — measured 1999 ms (c) + 2258 ms (objc) ≈ 4.26 s, purely to decide c-vs-objc.
This is already eliminated on main by #3137 (the sibling-classification ecosystem-gravity vote, PR #3190, merged today). The all-.hEXTERNAL_HEADERS directory now locks gravity at "100% Local Dominance" instead of falling to the tie-break. A/B on the real neighbourhood:
(The fleet's 12.47 s vs my 8.29 s on v2.9.0 is box variance — same path.) So ~4 s of this outlier is gone as of today, incidentally.
Residual ~4 s on main (with/without-file subtraction) is no longer detection — it's the analysis passes over the 2.64 MB machine-generated body:
phase
AvailabilityInternal.h contribution
Security_Lens
~1.98 s
Optical_Detector
~1.50 s
Lexical_Scan
~0.42 s
Language_Detector
~0.09 s (was ~4.2 s on v2.9.0)
This residual is the real target for the generated-file fast-lane idea: 23k near-identical #define lines don't need the full security + optical rule pass. A repetition-ratio / single-token-shape gate that routes obviously-generated files to a cheaper analysis lane would take the remaining ~3.5 s (Security + Optical) off it.
Real on both v2.9.0 and main — not touched by #3137. It's an extensionless dictionary: 63%+ pure one-word-per-line, avg 8 chars/line, and zero code punctuation ({ } ; ( )) anywhere in the file. In isolation the aperture filter rejects it, but inside the real mail/ code directory it's admitted (extensionless files are, to catch configure/scripts) and then fed to the Tier 4 extensionless discovery funnel, which scans it against many languages' rulesets:
phase
cost
Language_Detector (discovery funnel)
~1.0 s (dominant)
Optical_Detector
~0.5 s
Fix: a cheap data-vs-code gate ahead of the discovery funnel — near-zero code-punctuation density + high one-token-per-line ratio → classify as plaintext/data and skip the funnel + rule pass. This is the #1095-class "wordlist scanned as code" miss.
The words half is now fixed in PR #3194 — a data-shape fast-exit in the Tier 4 discovery funnel. Measured on the real git-tracked haiku/src/apps/mail: the words file 1.207s → 0.257s and the detector phase 1.05s → 0.02s, with byte-identical classification (detection audit unchanged, golden crucible 0 diffs).
Remaining on this issue: the AvailabilityInternal.hanalysis-lane residual (~2s Security_Lens + ~1.5s Optical_Detector over the 2.6MB generated body; its detection cost was already removed by #3137). That's the generated-file fast-lane lever, a larger change — leaving it open for that.
Fleet context: single-file outliers are a rounding error vs the systemic cost
Across the full 739-repo fleet, per-file outliers like these are negligible against the two real sinks (Optical Detector 61%, Security Lens 26.5% of fleet CPU; B_Braces alone 3,931s). The words half is fixed (#3194); the AvailabilityInternal.h detection cost was already removed by #3137, leaving only its analysis-lane residual (~3.5s on one file).
Recommendation: priority: low. The generated-file fast-lane for the AvailabilityInternal.h residual is a nice-to-have; the fleet's CPU is elsewhere (see #3182). Keep open for the residual, but it shouldn't compete with the B_Braces work.
PR #5441 fixes outlier 1 (directive-table fast lane for AvailabilityInternal.h-style headers). Outlier 2 (extension-less wordlist scanned as code, haiku src/apps/mail/words) is not addressed yet, so leaving open.
Claimed by promoter-bot host melek, lease renewed 2026-10-24T04:28Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.
Both outliers are addressed: the wordlist is fast-exited by #3194 (now pinned by tests in #6370), and the AvailabilityInternal.h cost is fixed by #3137 (detection) and #5441 (Security Lens). A ~1.3 s residual on a synthetic 2.2 MB table, spread over ~55 rules, remains. It cannot be removed without a golden-moving change to detector.py, and no burned-estate program needs it, so it is recorded as a sibling gap rather than kept open here.
Activity
squid-protocol commentedon Sep 19, 2026
Investigation: root causes measured, and one of the two is already fixed
Profiled both files on this box (galaxyscope,
COMMUNITY_FREE_TIER, engine at currentmain). The per-phase--file-speedsplit plus a with/without-file subtraction give a clean breakdown. The original "preprocessor-heavy rule with no literal gate" hypothesis is wrong — neither outlier is a runaway rule.1.
darwin-xnu/EXTERNAL_HEADERS/AvailabilityInternal.h(2.64 MB, 23,426 lines)The cost was language detection, not a rule. For a
.hcollision file where ecosystem gravity couldn't lock, detection fell through to the Tier 3 lexical tie-break, which runs the full 55-rule ruleset of every.hcandidate (c + objective-c) across the entire 2.64 MB — measured 1999 ms (c) + 2258 ms (objc) ≈ 4.26 s, purely to decide c-vs-objc.This is already eliminated on
mainby #3137 (the sibling-classification ecosystem-gravity vote, PR #3190, merged today). The all-.hEXTERNAL_HEADERSdirectory now locks gravity at "100% Local Dominance" instead of falling to the tie-break. A/B on the real neighbourhood:Heuristic Loop-Back (Consensus: objective-c)(tie-break path)main(#3137)Ecosystem Consensus Lock (100% Local Dominance)(The fleet's 12.47 s vs my 8.29 s on v2.9.0 is box variance — same path.) So ~4 s of this outlier is gone as of today, incidentally.
Residual ~4 s on
main(with/without-file subtraction) is no longer detection — it's the analysis passes over the 2.64 MB machine-generated body:This residual is the real target for the generated-file fast-lane idea: 23k near-identical
#definelines don't need the full security + optical rule pass. A repetition-ratio / single-token-shape gate that routes obviously-generated files to a cheaper analysis lane would take the remaining ~3.5 s (Security + Optical) off it.2.
haiku/src/apps/mail/words(275 KB, 28,137 lines)Real on both v2.9.0 and
main— not touched by #3137. It's an extensionless dictionary: 63%+ pure one-word-per-line, avg 8 chars/line, and zero code punctuation ({ } ; ( )) anywhere in the file. In isolation the aperture filter rejects it, but inside the realmail/code directory it's admitted (extensionless files are, to catchconfigure/scripts) and then fed to the Tier 4 extensionless discovery funnel, which scans it against many languages' rulesets:Fix: a cheap data-vs-code gate ahead of the discovery funnel — near-zero code-punctuation density + high one-token-per-line ratio → classify as
plaintext/data and skip the funnel + rule pass. This is the#1095-class "wordlist scanned as code" miss.Suggested disposition
Re-rank both against the full 739-repo batch once it completes (the fleet numbers were v2.9.0; #3137 will have moved every
.h-collision file).squid-protocol commentedon Sep 19, 2026
The
wordshalf is now fixed in PR #3194 — a data-shape fast-exit in the Tier 4 discovery funnel. Measured on the real git-trackedhaiku/src/apps/mail: thewordsfile 1.207s → 0.257s and the detector phase 1.05s → 0.02s, with byte-identical classification (detection audit unchanged, golden crucible 0 diffs).Remaining on this issue: the
AvailabilityInternal.hanalysis-lane residual (~2s Security_Lens + ~1.5s Optical_Detector over the 2.6MB generated body; its detection cost was already removed by #3137). That's the generated-file fast-lane lever, a larger change — leaving it open for that.perf(detection): data-shape fast-exit for wordlist/dictionary files (#…
squid-protocol commentedon Sep 19, 2026
Fleet context: single-file outliers are a rounding error vs the systemic cost
Across the full 739-repo fleet, per-file outliers like these are negligible against the two real sinks (Optical Detector 61%, Security Lens 26.5% of fleet CPU;
B_Bracesalone 3,931s). Thewordshalf is fixed (#3194); theAvailabilityInternal.hdetection cost was already removed by #3137, leaving only its analysis-lane residual (~3.5s on one file).Recommendation:
priority: low. The generated-file fast-lane for theAvailabilityInternal.hresidual is a nice-to-have; the fleet's CPU is elsewhere (see #3182). Keep open for the residual, but it shouldn't compete with the B_Braces work.docs+lint: core README bullet for the directive-table lane; sort impo…
perf(security): scan one line per distinct shape of a repetitive dire…
squid-protocol commentedon Oct 18, 2026
PR #5441 fixes outlier 1 (directive-table fast lane for AvailabilityInternal.h-style headers). Outlier 2 (extension-less wordlist scanned as code, haiku src/apps/mail/words) is not addressed yet, so leaving open.
squid-protocol commentedon Oct 24, 2026
Claimed by promoter-bot host
melek, lease renewed 2026-10-24T04:28Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:meleklabel.test(detection): pin the Tier 4 data-shape fast-exit over its whole i…
squid-protocol commentedon Oct 24, 2026
Both outliers are addressed: the wordlist is fast-exited by #3194 (now pinned by tests in #6370), and the AvailabilityInternal.h cost is fixed by #3137 (detection) and #5441 (Security Lens). A ~1.3 s residual on a synthetic 2.2 MB table, spread over ~55 rules, remains. It cannot be removed without a golden-moving change to detector.py, and no burned-estate program needs it, so it is recorded as a sibling gap rather than kept open here.