Revision f497242c61e8265290b794b3026b1bf0fc3655b8

Committed on 17/12/2025 6:04 am by Zohaib Sibte Hassan <zohaib@sibte.pk> [GitHub Diff]

Perf: Native memory allocation and hookDB connection optimization

Two performance improvements:

1. Native memory allocation via mimalloc for hot paths:
- Add encoding/native.go with MarshalNative using mimalloc
- Add encoding/native_stub.go for non-CGO fallback
- Integrate in meta_store_pebble.go hot paths (WriteIntent, BeginTransaction, etc.)
- 75% reduction in Go heap allocations for serialization

2. Fix hookDB connection held too long during CDC processing:
- Release hookDB connection immediately after SQLite rollback
- ProcessCapturedRows now runs after connection release (uses only Pebble)
- Reduces hookDB hold time from seconds (Pebble warmup) to milliseconds
- Fixes initial stall with high concurrency (512 threads)

???? Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>