Skip to content

perf: send TICK_DELTA instead of full snapshot on subsequent ticks - #18

Merged
Jhong098 merged 4 commits into
mainfrom
claude/fix-performance-issue-fDtOd
Apr 19, 2026
Merged

perf: send TICK_DELTA instead of full snapshot on subsequent ticks#18
Jhong098 merged 4 commits into
mainfrom
claude/fix-performance-issue-fDtOd

Conversation

@Jhong098

Copy link
Copy Markdown
Owner

Implements GitHub issue #5. The sim worker now tracks the previous snapshot
and sends only changed nodes/edges (TICK_DELTA) after the first full TICK,
reducing structured-clone payload by skipping unchanged objects at 10fps.

  • sim/delta.ts: computeDelta (diff two snapshots) and applyDelta (reconstruct)
  • sim/types.ts: adds SimDelta type and TICK_DELTA variant to WorkerOutbound
  • sim/worker.ts: tracks prevSnapshot; sends TICK on first tick, TICK_DELTA after
  • lib/store/simStore.ts: handles TICK_DELTA by applying delta to currentSnapshot
  • tests/unit/sim/delta.test.ts: 15 tests covering compute/apply round-trips

https://claude.ai/code/session_01Tnq6nZfFLKQeTK96NTW4vS

claude added 4 commits April 19, 2026 02:45
Implements GitHub issue #5. The sim worker now tracks the previous snapshot
and sends only changed nodes/edges (TICK_DELTA) after the first full TICK,
reducing structured-clone payload by skipping unchanged objects at 10fps.

- sim/delta.ts: computeDelta (diff two snapshots) and applyDelta (reconstruct)
- sim/types.ts: adds SimDelta type and TICK_DELTA variant to WorkerOutbound
- sim/worker.ts: tracks prevSnapshot; sends TICK on first tick, TICK_DELTA after
- lib/store/simStore.ts: handles TICK_DELTA by applying delta to currentSnapshot
- tests/unit/sim/delta.test.ts: 15 tests covering compute/apply round-trips

https://claude.ai/code/session_01Tnq6nZfFLKQeTK96NTW4vS
Adds .claude/settings.json that pre-approves pnpm commands and denies
npm install/ci invocations. Updates CLAUDE.md to document the requirement.

https://claude.ai/code/session_01Tnq6nZfFLKQeTK96NTW4vS
@vercel

vercel Bot commented Apr 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
poly-sd Ready Ready Preview, Comment Apr 19, 2026 2:49am

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@Jhong098
Jhong098 merged commit af0c5c8 into main Apr 19, 2026
5 checks passed
@Jhong098
Jhong098 deleted the claude/fix-performance-issue-fDtOd branch April 19, 2026 03:29
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.

3 participants