Performance
The engine keeps request-time work small. There is no published benchmark suite for it yet; measure your own templates before relying on specific numbers.
What the design does
- Parse at startup.
{{…}}delimiters are found once inSetup::run(); no parsing or regular expressions at request time. - Compiled templates. Each template is compiled once into a binding plan;
a render resolves each distinct placeholder name once, sizes one
Stringand writes static text and values into it. - Borrowed values.
ParamsreturnsCow<str>, so struct fields andHashMapvalues are copied straight into the output. - Shared read lock. Lookups take a read lock on an
RwLock<HashMap>; many requests can read at once.Engine::getreturns anArc<Template>, so a lookup never copies the template. - Signing cost. Keys are decoded and validated once in
Setup::run(). HMAC-SHA256 and Ed25519 signing run once per envelope over the v2 message, which allocates the message bytes. Unsigned engines build no message.