PureXML/Sources
Mihaela Mihaljevic d359208ff6 perf(serialize): precompute the attribute quote, bulk-copy comment/PI escaping
Two profile-guided serialize passes (#139, docs/benchmarks.md passes 29-30).
The attribute writer now precomputes the quote character as a String once
per element instead of interpolating a Character into every attribute,
avoiding the grapheme-breadcrumb machinery that repeats twice per attribute
for a value that never changes within an element. Escaping.comment and
processingInstruction's escaping fallback (taken whenever a comment has a
hyphen or PI data has a '?', a case pass 8 could skip past but not speed up)
is rewritten in the same byte-scan bulk-copy shape as passes 23-24, so a
value with one rare trigger no longer pays a full character-by-character
rebuild.

Both are same-observable-behavior changes. The quote change is byte-
identical by construction. The comment/PI rewrite is verified against a new
differential suite that reimplements the original character-loop as an
independent oracle and checks adjacency/trailing/combining-mark cases plus
two 20000-case seeded fuzzes, since a byte match inside a combining-mark
cluster is not, on its own, the bare trigger character. Full local suite
(1925 tests) unchanged.

Measured with interleaved same-state A/B: pass 29 ~1.5% at a 100k-item
corpus; pass 30 ~2x on a dedicated comment/PI micro-benchmark (the standard
corpus has no comment/PI content, so real documents with copyright banners
or hyphenated comment prose see this, not the headline ratio). A same-
session multi-append restructuring attempt measured a clear ~6% regression
and was reverted; a suspected hasInlineContent double-scan was profiled at
~0.2% of samples and not worth a pass. Both outcomes are recorded in
docs/benchmarks.md rather than dropped.
2026-07-15 04:05:29 +02:00
..
Canonical refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
Catalog refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
Emitting perf(serialize): precompute the attribute quote, bulk-copy comment/PI escaping 2026-07-15 04:05:29 +02:00
HTML refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
Model refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
Parsing refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
Pattern refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
Regex refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
Schema refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
Stream chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
Validation refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
XInclude refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
XPath refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
XPointer refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
XSLT refactor(validation): decompose XSD instance validation into composable rules 2026-07-12 14:12:17 +02:00
API.swift perf(parse): build the TreeNode tree directly from the event stream (#295) 2026-06-25 14:15:57 +02:00
Lint.swift feat(editor): unified lint surface merging parse and validation diagnostics 2026-06-08 13:18:29 +02:00
PureXML.swift feat(html): lenient HTML parser and serializer 2026-06-08 07:12:42 +02:00
QuickFix.swift feat(editor): structured quick-fixes from completions 2026-06-08 13:35:33 +02:00