mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-07 07:32:35 +09:00
With the Coucou window open, one WebKitWebProcess stayed at about 100 % of a core on Linux (KDE Plasma 5.27, X11, WebKitGTK 2.52.6), focused or not. Measured per canvas, almost all of it was the sleeping Mochi of an empty page (the Dictation page's empty history, shown at every launch until you dictate): 60-75 ms a frame, growing over time, for a 64x64 canvas. Its z's grow as they rise, so each frame set `ctx.font` to a new fractional size, and WebKitGTK resolved and cached a new font every time. The z is now drawn at one font size (32 px) and scaled: 0.3 ms a frame. The window's canvases are also drawn at 30 frames a second with the focus and 10 behind other windows, instead of 60: WebKitGTK paints and composites each changed canvas in software, which cost about half a core at 60 even with the font fixed. Mochi's engine is stepped in pieces of at most 1/30 s, since its mouth spring is unstable above 0.08 s per step. CPU of the whole app with the window open (Ubuntu 24.04, X11, RTX 2060): 0.5.9: ~100 % focused, ~100 % behind other windows font fix only (60 fps): 49 % 46 % font fix + 30/10 fps: 24 % 10 % Nothing looks different apart from the frame rate. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>