Commit 568a539
fix(workflow-renderer): remove quadratic backtracking in reference highlighting (#7672)
The env-var branch of the display-text scanner used `\{\{[^}]+\}\}`. Because
the character class admits `{`, a run of unmatched braces restarts a full
backtracking scan at every offset, making the scan quadratic — 100k braces
took 8.3s. Excluding `{` from the class makes it linear (~1ms) and matches
the `[^{}]+` form the executor's placeholder resolvers already use, so
highlighting no longer marks references the executor would never resolve.
Claude-Session: https://claude.ai/code/session_0139x4ngJzcoYrjwsS9B2ZG4
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 575bc6b commit 568a539
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments