Restore recursive cek_run, remove step counter/limit
The iterative cek_run with Atomic step counting and debug prints added overhead and complexity. The debug print called value_to_str twice per million steps which could be very slow on large expressions. Restore the original recursive cek_run from before the iterative conversion. Remove the step limit mechanism (was causing render timeouts). The recursive version is simpler and proven. 1166 passed, 0 failed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2017,9 +2017,6 @@ let http_mode port =
|
||||
in
|
||||
match work with
|
||||
| Some (fd, path, headers) ->
|
||||
(* ~10M steps ≈ 3-5 seconds of CEK evaluation *)
|
||||
Atomic.set Sx_ref._step_count 0;
|
||||
Atomic.set Sx_ref._step_limit 10_000_000;
|
||||
let response =
|
||||
try
|
||||
let is_ajax = List.exists (fun (k, _) -> k = "sx-request" || k = "hx-request") headers in
|
||||
@@ -2035,7 +2032,6 @@ let http_mode port =
|
||||
Printf.eprintf "[render] Error for %s: %s\n%!" path (Printexc.to_string e);
|
||||
http_response ~status:500 "<h1>Internal Server Error</h1>"
|
||||
in
|
||||
Atomic.set Sx_ref._step_limit 0;
|
||||
write_response fd response
|
||||
| None -> ()
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user