Repository navigation
levain 0.6.9
A memory fix for the reply classifier's size bound.
Fixed
- The 200 kB size check no longer copies a reply it will not check. It compared the reply's UTF-8 size by encoding the whole reply first, so a very large reply cost a transient copy of itself (a 300-million-character reply: 0.03 s and about 286 MiB, measured 2026-10-05). A reply with more characters than the bound is now refused before anything is encoded; UTF-8 spends at least one byte per character, so it is over the bound in bytes too.