Compiling schemas into kbnf engine is a very nontrivial process and unfortunately it is theoretically impossible to have a truly robust algorithm(in the sense of no accidental quadratic or even nonpolynomial complexity), but we can (and should) add some docs/warnings/assertions to ensure users' server wont accidentally use 77GB RAM(+VRAM) and killed by OS.
[ ] DFA max memory cap
[ ] Monitor potentially ambiguous CFG grammar?
[ ] Warning on the exponential behavior of optional JSON fields support
[ ] more comprehensive docs on this issue, maybe a separate dedicated page
Compiling schemas into kbnf engine is a very nontrivial process and unfortunately it is theoretically impossible to have a truly robust algorithm(in the sense of no accidental quadratic or even nonpolynomial complexity), but we can (and should) add some docs/warnings/assertions to ensure users' server wont accidentally use 77GB RAM(+VRAM) and killed by OS.