HERMES-GIELIE/static
Basit Mustafa 0217bf5cce
perf(streaming): throttle live render to ~15fps to prevent crash under GC pressure (#966)
_scheduleRender() uses requestAnimationFrame to update the live assistant
message during streaming. rAF fires at up to 60fps, but each DOM update
takes 50-150ms on sessions with long histories — far exceeding the 16ms
rAF budget.

During GC pauses (which can run for hundreds of milliseconds), rAF
callbacks accumulate. When the GC yields, the browser executes all
queued callbacks sequentially in a single RunTask. A Chrome performance
trace shows a 13.6-second RunTask containing 1,240 accumulated render
callbacks — which causes the renderer to crash (Chrome error codes 4/5,
ERR_EMPTY_RESPONSE / ERR_CONNECTION_RESET).

Fix: track the last render timestamp and delay scheduling the next rAF
until at least 66ms (15fps) have elapsed since the previous render.
If within the 66ms window, use setTimeout to defer the rAF rather than
skipping it — this batches token updates without dropping any content.

The 66ms interval is conservative enough to prevent runaway accumulation
while fast enough that streaming text still feels immediate. The _renderPending
flag continues to prevent double-scheduling within each interval.

Co-authored with Claude Sonnet 4.6 / Anthropic.
2026-04-24 11:44:47 -07:00
..
vendor chore: vendor streaming-markdown@0.2.15, remove CDN dependency 2026-04-24 01:05:20 +00:00
boot.js refactor(ui): three-column layout with left rail + main-view migration (#899) 2026-04-24 09:05:25 -07:00
commands.js v0.50.185: /btw stream hardening + .venv bootstrap + /reasoning toast (#935 #939 #941 #942) 2026-04-23 23:25:45 -07:00
favicon-32.png fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.ico fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.svg fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
i18n.js i18n: add complete Traditional Chinese (zh-Hant) translations (#954) 2026-04-24 11:36:41 -07:00
icons.js refactor(ui): three-column layout with left rail + main-view migration (#899) 2026-04-24 09:05:25 -07:00
index.html i18n: add complete Traditional Chinese (zh-Hant) translations (#954) 2026-04-24 11:36:41 -07:00
login.js feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini) 2026-04-16 11:20:08 -07:00
manifest.json feat: add PWA support (manifest, service worker, install prompt) (#920) 2026-04-23 15:14:21 -07:00
messages.js perf(streaming): throttle live render to ~15fps to prevent crash under GC pressure (#966) 2026-04-24 11:44:47 -07:00
onboarding.js fix(config): use Hermes config.yaml as single source of default model (#773) 2026-04-20 22:12:01 +00:00
panels.js refactor(ui): three-column layout with left rail + main-view migration (#899) 2026-04-24 09:05:25 -07:00
sessions.js i18n: add complete Traditional Chinese (zh-Hant) translations (#954) 2026-04-24 11:36:41 -07:00
style.css fix(ui): close 641-767px rail/hamburger breakpoint gap (#956) 2026-04-24 09:13:00 -07:00
sw.js feat: add PWA support (manifest, service worker, install prompt) (#920) 2026-04-23 15:14:21 -07:00
ui.js fix(streaming): strip malformed DSML function_calls tags (#958) 2026-04-24 11:04:16 -07:00
workspace.js feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini) 2026-04-16 11:20:08 -07:00