Files
swift-nio-imap/Sources/NIOIMAPCore
Daniel Eggert 757710b755 Replace keyword lookup tables with switches
parseFromLookupTable built a dictionary of capturing closures on every
call; selectingKeyword + switch calls the sub-parser directly.
parseMessageAttribute's 19-entry table cost 19 closure boxes plus the
dictionary's storage per call, one of which was invoked. Parsing FETCH
responses with BODYSTRUCTURE, the pattern was ~25% of the parser's
allocations and ~19% of its allocated bytes.

parseLookupKeyword scans the keyword with a fresh tracker
(.makeNewDefault), so the scan doesn't count towards recursion depth;
the sub-parser gets the caller's tracker.

Unknown-keyword ParserError hints now name the production and no longer
include the offending keyword (public ParserError.hint changes).
2026-11-20 12:49:15 +01:00
..
2026-08-29 09:23:34 +02:00
2026-07-07 11:37:57 +02:00