Recent Activities
This page shows what are we working on.
-
head
-
1.4.5
-
head
-
head
-
head
-
perf: Fix DeferJs regression - revert to native DOM (16x faster)
Commit f4977f5 (Oct 13) introduced TrackedDomDocument methods which add
expensive tracking overhead. Reverting to native removeChild/appendChild.
Results:
- moveScriptsToBodyEnd: 0.078s → instant
- DeferJs: 0.082s → 0.005s (16.4x faster)
- Coordinator: 0.213s → 0.158s (1.35x faster)
Fix: Use native DOM + context.markDirty() for correct patch regeneration. aab2e3
-
-
1.16.7
-
perf: Remove SignatureOffsetFinder and add profiling (11x faster)
Removed SignatureOffsetFinder strategy which consumed 91% of indexing time.
Added profiling to Chain and Tracker for performance analysis.
Performance:
- indexNodes: 0.243s → 0.022s (11x faster)
- Coordinator: 0.448s → 0.213s (2.1x faster)
- indexNodes as % of total: 54.5% → 10.3%
Coverage: All nodes still indexed by FastTag, ParentContext, and Content strategies. 348919 -
PatchManager: exact regex check for <html>/<head>/<body>, better logging 5f56f4
-
perf DirectMatchStrategy: clean up and document core fast/UTF-8 replacement logic 2eb9cf
-
OffsetBasedStrategy: drop global ASCII cache; use local fragment check only, cleanup profiling 864be2
-
FastTagOffsetFinder: skip duplicated tags, delegate ambiguous offset matching to safe strategies 965136
-
TrackedDomDocument: robust UTF-8 charset handling, correct structure restoration, and extensive encoding tests ac2673
-
LCP Optimizer: batch node indexing, XPath constants, and TrackedDomDocument fixes cad15d
-
fix(TrackedDomDocument): Fix UTF-8 with meta charset injection
Problem: DOMDocument converts UTF-8 (Σχετικά) to entities (Σ...)
Solution: Inject <meta charset=utf-8>, then remove after parsing
Changes:
- addUtf8Charset(): inject meta tag (document/fragment aware)
- removeUtf8Charset(): cleanup meta + extract body for fragments
- Proper libxml error handling (no @ suppression)
Result: UTF-8 preserved, testBomIsRemovedFromOutput ✅ PASS
Technical: Forces libxml UTF-8 mode, saveHTML() outputs UTF-8 correctly 76abb7 -
perf(OffsetBasedStrategy): Fix UTF-8 handling and add ASCII detection cache
**Problems fixed:**
1. UTF-8 characters incorrectly handled - byte/char offset mismatch
2. Performance bottleneck - repeated mb_strlen() on large HTML
**Solutions:**
1. Convert byte offset to character offset for mb_substr
2. Cache ASCII detection (xxh3 hash, 100 entry limit, FIFO)
3. Remove broken isUtf8Safe() - use reliable ASCII check
**Performance:**
- 500KB HTML, 100 patches: 500ms → 15ms (33x faster)
- Cache hit rate: 99%+ expected
**Stats:** cache_hits, cache_misses, cache_hit_rate added 9c537c -
refactor: manual node indexing in TrackedDomDocument, update pipeline/context a758d3
-
-
1.0.9
-
1.0.8