e76a355df5
fix(resolution): gate closure-collection synthesis to Swift/Kotlin and de-quadratic its line accounting ( #1235 ) ( #1237 )
...
closureCollectionEdges scanned every method/function node in every
language, but its dispatcher patterns ({ $0( / { it( ) are Swift/Kotlin
trailing-closure syntax — on PHP/JS repos the pass can never emit an
edge, yet .push(/.add( fired its append gate on nearly every function.
Per match it computed the line via src.slice(0, idx).split('\n'), which
is O(source) per match and goes quadratic on match-dense generated
functions (two-byte content roughly doubles it). On a 12,860-file
PHP/JS app that was 20+ minutes of the "Resolving refs" tail — frozen
at 97% — and a #850 watchdog kill; profiled on CRMEB it was 127s of a
166s index for zero edges.
- Skip nodes whose language isn't swift/kotlin before any file I/O.
- makeLineAt(): lazy newline index + binary search, shared with the
emitter passes' per-file lineOf.
- Yield every 256 regex matches inside the scan's match loops so a
single pathological function can't starve the watchdog.
CRMEB (ThinkPHP, 2,913 files): 166.8s -> 72.7s, graph byte-identical.
Alamofire: closure-collection edges byte-identical (9 edges, 4 fields).
Drupal core control: graph byte-identical.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com >
2026-07-09 20:54:45 -05:00
..
2026-04-06 14:27:13 -05:00
2026-06-02 10:15:27 -05:00
2026-06-22 12:06:35 -05:00
2026-06-28 22:46:24 -05:00
2026-07-06 09:07:15 -05:00
2026-06-26 17:53:19 -05:00
2026-06-20 21:22:52 -05:00
2026-07-02 18:41:55 -05:00
2026-07-02 19:02:16 -05:00
2026-06-13 14:48:52 -05:00
2026-06-28 21:54:26 -05:00
2026-06-28 22:01:47 -05:00
2026-06-13 15:18:55 -05:00
2026-07-09 20:54:45 -05:00
2026-05-21 15:48:04 -05:00
2026-06-08 00:10:10 -04:00
2026-06-08 22:43:54 -04:00
2026-01-18 18:48:22 -06:00
2026-07-01 12:13:42 -05:00
2026-06-08 01:25:21 -04:00
2026-06-28 20:11:05 -05:00
2026-07-07 09:13:13 -05:00
2026-06-13 13:53:38 -05:00
2026-06-13 12:59:41 -05:00
2026-06-27 13:47:29 -05:00
2026-07-08 23:18:23 -05:00
2026-06-21 14:03:07 -05:00
2026-05-24 04:41:04 -05:00
2026-07-02 12:56:02 -05:00
2026-07-03 14:53:04 -05:00
2026-06-26 20:25:47 -05:00
2026-06-22 12:06:35 -05:00
2026-06-22 12:06:35 -05:00
2026-07-03 14:32:20 -05:00
2026-06-28 22:23:35 -05:00
2026-06-22 12:06:35 -05:00
2026-06-06 11:02:59 -04:00
2026-06-22 16:16:23 -05:00
2026-07-07 12:19:10 -05:00
2026-05-26 02:14:00 -05:00
2026-06-13 09:48:44 -05:00
2026-07-02 14:35:38 -05:00
2026-07-07 14:17:16 -05:00
2026-06-22 18:16:11 -05:00
2026-07-02 17:05:51 -05:00
2026-06-11 15:44:14 -05:00
2026-05-28 12:38:03 -05:00
2026-05-28 23:41:11 -05:00
2026-05-20 10:32:08 -05:00
2026-05-19 10:45:20 -05:00
2026-06-22 18:16:11 -05:00
2026-07-01 13:37:20 -05:00
2026-07-02 17:23:54 -05:00
2026-07-07 10:11:58 -05:00
2026-07-07 13:01:38 -05:00
2026-06-29 23:15:41 -05:00
2026-06-26 20:25:47 -05:00
2026-06-29 23:35:50 -05:00
2026-06-21 12:36:41 -05:00
2026-05-28 15:13:23 -05:00
2026-05-20 18:36:18 -05:00
2026-06-02 14:23:33 -05:00
2026-06-21 09:45:24 -05:00
2026-06-13 11:51:57 -05:00
2026-06-22 12:41:26 -05:00
2026-06-22 11:31:49 -05:00
2026-07-08 23:18:23 -05:00
2026-05-25 23:48:10 -05:00
2026-05-26 15:39:48 -05:00
2026-06-02 17:49:15 -05:00
2026-05-25 19:54:56 -05:00
2026-06-26 19:31:12 -05:00
2026-05-20 11:35:13 -05:00
2026-06-22 12:06:35 -05:00
2026-07-07 08:45:12 -05:00
2026-06-20 13:23:16 -05:00
2026-06-27 15:47:31 -05:00
2026-06-23 12:57:47 -05:00
2026-06-20 22:34:24 -05:00
2026-07-07 13:01:38 -05:00
2026-07-07 09:46:22 -05:00
2026-07-06 12:41:32 -05:00
2026-06-22 12:06:35 -05:00
2026-05-21 15:48:04 -05:00
2026-05-21 15:48:04 -05:00
2026-05-31 19:05:40 -05:00
2026-07-07 08:45:12 -05:00
2026-06-02 10:15:27 -05:00
2026-06-20 15:17:31 -05:00
2026-07-06 14:20:19 -05:00
2026-06-27 15:32:50 -05:00
2026-06-20 20:30:13 -05:00
2026-06-26 20:25:47 -05:00
2026-07-02 14:35:38 -05:00
2026-05-26 03:25:06 -05:00
2026-06-24 14:48:16 -05:00
2026-07-08 23:18:23 -05:00
2026-06-21 11:35:12 -05:00
2026-06-06 11:02:59 -04:00
2026-06-20 14:45:51 -05:00
2026-07-06 12:41:32 -05:00
2026-06-06 11:02:59 -04:00
2026-06-20 19:23:37 -05:00
2026-06-22 12:06:35 -05:00
2026-05-07 20:35:49 -05:00
2026-06-22 17:23:17 -05:00
2026-07-02 17:23:54 -05:00
2026-06-21 01:32:33 -05:00
2026-06-20 22:00:43 -05:00
2026-05-21 15:48:04 -05:00
2026-07-07 08:45:12 -05:00
2026-07-06 09:07:15 -05:00
2026-06-11 12:04:51 -05:00
2026-05-07 22:03:33 -05:00
2026-07-02 17:11:19 -05:00
2026-05-26 02:14:00 -05:00
2026-05-26 02:14:00 -05:00
2026-06-02 10:15:27 -05:00
2026-06-22 10:51:20 -05:00
2026-07-08 23:18:23 -05:00
2026-06-23 11:26:23 -05:00
2026-06-11 14:48:11 -05:00
2026-06-13 12:35:18 -05:00
2026-06-06 13:38:38 -04:00
2026-06-16 12:16:00 -05:00
2026-06-20 20:08:34 -05:00
2026-06-20 20:49:06 -05:00
2026-05-22 05:39:24 -05:00
2026-05-21 18:06:02 -05:00
2026-07-02 11:59:22 -05:00
2026-06-28 19:35:17 -05:00