From 6a043e28244d27c5e13a8efd0841a45cc08f62e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Balv=C3=ADn?= Date: Fri, 18 Sep 2026 00:20:31 +0200 Subject: [PATCH] docs(architecture): scope the no-caching claim to the parser Assisted-by: GLM 5.3 Flash --- docs/ARCHITECTURE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index cc5a3b5..dc376a8 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -99,8 +99,8 @@ sequenceDiagram `Decode`, `DecodeContext`, `Marshal` and `MarshalContext` call allocates its own unexported worker, so a configured type is safe for concurrent use; the setter methods are not, and must finish before the value is shared. -- The parser is allocated per `ParseContext` call; nothing is cached between - documents. +- The parser is allocated per `ParseContext` call; the parser itself caches + nothing between documents. - The one piece of shared state is the struct-schema cache in `decode.go`: a `sync.Map` keyed by `reflect.Type`, holding the flattened field layout the decoder and the encoder both consult. A schema is immutable once published,