Skip to content

Fix webview lag during canvas panning - #660

Merged
Anton-Horn merged 1 commit into
mainfrom
fix/webview-pan-sync
Sep 10, 2026
Merged

Fix webview lag during canvas panning#660
Anton-Horn merged 1 commit into
mainfrom
fix/webview-pan-sync

Conversation

@Anton-Horn

Copy link
Copy Markdown
Contributor

Summary

  • synchronize fixed browser and T3 webview surfaces in the same task as canvas transforms
  • avoid redundant observer-driven geometry passes from canvas world, overlay, and grid updates
  • add regression coverage for immediate alignment and duplicate-frame suppression

Performance

Electron A/B traces used 1, 2, 5, 10, and 25 live webviews with three 120-frame pan sweeps per count. The previous path missed immediate alignment on 11 of 12 probes at every count; the optimized path missed 0 of 12. Median geometry cost ranged from 0.29 ms/frame with one webview to 2.34 ms/frame with 25 webviews. At 25 webviews, median p95 frame time was 10.1 ms versus 10.5 ms before the fix on a 120 Hz display.

Validation

  • 19 targeted Vitest tests
  • npm run typecheck
  • targeted ESLint check
  • npm run build
  • git diff --check
  • Electron performance A/B trace

@Anton-Horn
Anton-Horn merged commit ba9ea15 into main Sep 10, 2026
3 checks passed
@Anton-Horn
Anton-Horn deleted the fix/webview-pan-sync branch September 10, 2026 19:41
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.

1 participant