3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 06:35:44 +01:00

Answer CodeRabbit's review: 0 🔴, 1 🟡; only a catchable out-of-memory throw is engine-limit, and isolation from heap exhaustion takes a separate process, not a worker

This commit is contained in:
2026-10-13 19:59:15 +02:00
committed by Lillem4n
parent 667360f6e6
commit eff957fbbe
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -412,10 +412,10 @@ typed on `ConvertError` takes both.
A call reports the first refusal in document order and stops, so a document with several surfaces
them one per call. Every refusal but `engine-limit` is deterministic — there is no I/O anywhere —
so a retry returns the identical error: fix the input, or set the document aside. `engine-limit`
can mean memory ran short: retry it once, and treat a repeat as lasting. On V8 (Node, Deno,
Chrome), running out of JavaScript heap ends the process. In Node, convert input of unbounded size
in a `worker_threads` worker given `resourceLimits`: running out of heap there ends only that
worker.
can mean memory ran short: retry it once, and treat a repeat as lasting. Only an out-of-memory
throw the call can catch becomes `engine-limit`: on V8 (Node, Deno, Chrome), running out of
JavaScript heap ends the process. Convert input of unbounded size in a separate process with its
own memory limit where that must not take yours down.
### Parsing