江俊杰
b570794515
perf(reasoning): precompile alpha node condition regex
...
unify_condition() rebuilt a regex (re.split + concat + re.match) for
every fact tested against every alpha node. Since RETE evaluates many
facts across many alpha nodes, this repeated construction added
significant overhead.
- Extract regex construction into _build_condition_regex() (reused by
unify_condition and AlphaNode).
- AlphaNode.__init__ now compiles its condition once (no initial
bindings at alpha time) into self._compiled and reuses it per fact.
- On compile failure, log a WARNING and treat the node as non-matching,
consistent with the earlier observability fix.
- Add tests for the compiled path and the compile-failure fallback.
Refs #300
2026-08-19 10:24:24 +08:00
..
2026-04-02 18:10:11 +05:30
2026-07-31 16:05:37 +05:30
2026-08-18 18:24:52 +05:00
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-08-11 12:52:15 +05:00
2026-01-08 18:56:42 +05:30
2026-08-15 13:48:26 +05:30
2026-08-15 22:10:04 +05:30
2026-08-11 16:24:28 +05:30
2026-08-18 13:58:32 +05:30
2026-01-16 01:19:33 +05:30
2026-08-16 11:15:43 +05:00
2026-08-18 18:03:20 +05:00
2026-08-16 15:24:34 +05:30
2026-04-11 13:52:04 +05:30
2026-08-16 14:07:10 +05:00
2026-08-11 16:49:54 -07:00
2026-08-11 16:49:54 -07:00
2026-08-19 10:24:24 +08:00
2026-08-12 17:43:10 +05:30
2026-08-15 13:48:26 +05:30
2026-08-17 13:16:17 +05:30
2026-08-15 16:20:49 +05:00
2026-08-17 14:30:12 +05:00
2026-08-13 22:42:34 +05:30
2026-04-16 12:15:59 +05:30
2026-01-08 17:23:31 +05:30
2026-04-29 21:17:36 +05:00
2026-01-12 17:15:21 +05:30
2026-08-18 02:18:39 +05:00
2026-03-13 06:31:38 +05:30
2026-04-07 17:42:08 +05:30
2026-03-26 12:38:24 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 20:13:28 -05:00
2026-05-23 00:14:23 +05:30
2026-02-02 22:56:53 +05:30
2026-06-04 12:34:12 +05:30
2026-06-16 04:43:45 +05:00
2026-07-16 20:11:58 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-05-29 23:45:29 +05:30
2026-01-24 20:53:21 +05:30
2026-08-11 16:24:28 +05:30
2026-08-11 16:24:28 +05:30
2026-01-08 17:23:31 +05:30
2026-01-27 21:55:22 +05:30
2026-01-24 20:53:21 +05:30
2026-01-08 17:23:31 +05:30
2026-05-15 20:00:44 +05:30
2026-02-02 23:50:00 +05:30
2026-07-31 13:14:29 +05:30
2026-08-12 14:07:47 +05:30
2026-08-12 13:56:02 +05:30
2026-01-10 23:32:10 +05:30
2026-08-17 12:40:10 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-03-18 00:17:08 +05:30
2026-05-23 00:14:23 +05:30
2026-01-08 17:23:31 +05:30
2026-06-16 11:03:45 +05:30
2026-01-16 01:19:33 +05:30
2026-02-10 12:22:16 +05:30
2026-08-12 21:14:55 +05:30
2026-08-11 18:37:50 +05:30
2026-08-17 18:55:38 +05:30
2026-01-10 23:32:10 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-02-04 00:17:25 +05:30
2026-04-07 17:42:08 +05:30
2026-01-08 17:23:31 +05:30
2026-01-08 17:23:31 +05:30
2026-06-04 16:57:00 +05:30