Skip to content

fix(providers): flush logs before state update to reduce WASM memory growth#469

Open
nicklasl wants to merge 2 commits into
mainfrom
nicklasl/flush-before-state-update
Open

fix(providers): flush logs before state update to reduce WASM memory growth#469
nicklasl wants to merge 2 commits into
mainfrom
nicklasl/flush-before-state-update

Conversation

@nicklasl

@nicklasl nicklasl commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Flush WASM log buffers before each SetResolverState call across all providers (Go, Java, JS, Python)
  • Reduces WASM linear memory growth by ~85% by clearing small per-resolve allocations before large state allocations, preventing heap fragmentation in dlmalloc
  • Java: moved existing post-state-update flush to before state update

Closes #455 (option 4 — stopgap)

Test plan

  • Go tests pass (make test)
  • Java tests pass (make test)
  • JS tests pass (make test)
  • Python tests pass (make test)

🤖 Generated with Claude Code

nicklasl and others added 2 commits July 2, 2026 07:54
…growth (#455)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nicklasl nicklasl marked this pull request as ready for review July 2, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WASM linear memory grows unboundedly when SetResolverState is interleaved with resolves

1 participant