You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously glaspen2_modeler_end() called runtime().block_on(db::end_stroke())
which blocked the CGEventTap thread on SQLite INSERT + transaction commit.
Flame-graph showed ~3.2% of main-thread time spent in this block_on.
Now end_stroke_spawned() atomically takes the pending stroke-id and points
from memory (synchronous Mutex ops, ~1μs), then spawns the DB write on the
tokio runtime. The event-tap thread returns immediately.
The old block_on path is kept for clear_strokes which must flush before
checking screen_has_strokes and creating a new screen.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>