← Back to Pull requests

perf(linter/vue/prop-name-casing): precompile `ignoreProps` regex pattern #24413

Closed
unknown closed this pull request without merging on Jul 13, 2026 09:46 UTC
View on GitHub
unknown unknown commented on Jul 12, 2026 19:47 UTC
Author

is_ignored in vue/prop-name-casing recompiled each slash-wrapped ignoreProps pattern with Regex::new for every prop it checked. This compiles the patterns once in from_configuration into an Exact/Pattern(Regex) matcher enum stored on the options (serde/schemars-skipped field), and matches against that.

Invalid regex patterns are dropped at compile time, which preserves the previous behavior (they could never match before either, and were not compared as literals).

Benchmark

Interleaved paired-sample benchmark (N=40, alternating order, --silent), release binaries built from this branch and its merge-base.

Fixture: 220 Vue SFCs / 35,200 props / 36.5K lines, single-rule oxlintrc with ignoreProps: ["ignored_prop", "/^legacy/", "/_deprecated$/", "/^(alpha|beta)_/", "/[/"] (one exact pattern, three regexes, one invalid regex).

| | baseline | this branch |
|---|---|---|
| rule on | 66.87 ms | 16.69 ms |
| parse only | 8.47 ms | 8.41 ms |

Paired Δ of +50.17 ms (sd 2.18, t=146, faster in 40/40 pairs). The parse-only differential is null (+0.06 ms, t=0.2), so the saving is attributable to the rule and not to binary layout.

That works out to 4.0× on this fixture, but the multiplier is fixture-dependent — the work removed scales with regex_pattern_count × prop_count, so denser configs show a larger ratio. The ~50 ms saved across 35K props is the more transferable number.

Correctness

Verified with --format=json (without --silent, which empties the JSON reporter's diagnostics array): both binaries emit the same 10,560 diagnostics, identical after sorting — the array order varies between runs because files are linted in parallel. The fixture includes canary props that are only ignored via the regex patterns, plus an invalid regex; the ignore semantics are unchanged.

Disclosure

This change was implemented and benchmarked with AI assistance (Claude Code), and has been reviewed by the submitter.

🤖 Generated with Claude Code

Diff: 254 lines (+190 / -64) across 3 files Reviewer: connorshea Review duration: 838m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 254 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.332
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #24413"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.1% (MEDIUM) · Higher = larger blast radius
39.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.4% · Safe to merge
15.4%