Skip to content

perf: render loop, ML pipeline, and effects optimizations - #18

Merged
Wei-1 merged 1 commit into
OpenLive3D:mainfrom
Ghostkwebb:perf/render-loop-optimizations
Jul 11, 2026
Merged

perf: render loop, ML pipeline, and effects optimizations#18
Wei-1 merged 1 commit into
OpenLive3D:mainfrom
Ghostkwebb:perf/render-loop-optimizations

Conversation

@Ghostkwebb

Copy link
Copy Markdown
Contributor

Summary

Performance optimizations across the render loop, ML pipeline, and effects system.

Changes

  • Fix clock.getDelta() bug — called twice per frame; second call returned ~0, breaking effect timing
  • Batch rain particles — single stroke() call instead of per-particle (3-5x faster)
  • Zero-copy ML frame transfer — OffscreenCanvas + ImageBitmap replaces getImageData() readback
  • Cache DOM refs — eliminates 60 getElementById calls/sec in effect loop
  • for...in loops — replaces Object.keys().forEach in hot paths
  • Fix redundant bone lookups — getNormalizedBoneNode() called twice for same key
  • Visibility toggle — replaces ppScene.add/remove per frame
  • Debounce config saves — 500ms debounce prevents IPC spam
  • Date.now() — replaces new Date().getTime()
  • Guard updateLog() — skips work when log panel is hidden
  • Sync version to 2.6.1

- Fix clock.getDelta() double-call bug (effects received 0 delta)
- Batch rain particles into single stroke call (3-5x faster)
- Use OffscreenCanvas + ImageBitmap for zero-copy ML frame transfer
- Cache DOM refs in effect update loop
- Replace Object.keys().forEach with for...in in hot paths
- Fix redundant getNormalizedBoneNode() calls
- Use visibility toggle instead of scene add/remove per frame
- Debounce config saves (500ms)
- Replace new Date().getTime() with Date.now()
- Guard updateLog() when panel is hidden
- Sync version to 2.6.1

@Wei-1 Wei-1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! LGTM!

@Wei-1
Wei-1 merged commit 00f2079 into OpenLive3D:main Jul 11, 2026
1 check failed
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.

2 participants