• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

humanspeak / svelte-virtual-chat / 25125703677
98%
main: 98%

Build:
Build:
LAST BUILD BRANCH: chore/perf-bench-cascade-and-heap
DEFAULT BRANCH: main
Ran 29 Apr 2026 06:09PM UTC
Jobs 1
Files 2
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Apr 2026 06:08PM UTC coverage: 97.521%. First build
25125703677

push

github

web-flow
perf(virtual-chat): coalesce ChatHeightCache version bumps via microtask (#18)

* perf(virtual-chat): coalesce ChatHeightCache version bumps via microtask

Defers the `#version++` in `cache.set()` to a `queueMicrotask`-scheduled
callback so a batch of `set()` calls within the same task (the typical
ResizeObserver burst when newly-mounted message rows are measured)
collapses into one downstream cascade. The boolean return from `set()`
is unaffected — it's still synchronous and accurate per-call.

`delete()` and `clear()` keep their synchronous bumps but route through
a new `#flushBumpSync()` helper that supersedes any pending deferred
bump (clears the pending flag so the queued microtask becomes a no-op
when it fires). This preserves the rare-path semantics the issue
called for and avoids double-bumping when a delete chases a set within
the same task.

Cancel-via-flag pattern instead of a token counter: `#scheduleBump()`
sets `#pendingBump = true` and queues the microtask; `#flushBumpSync()`
clears the flag and bumps; the queued microtask short-circuits if it
sees the flag is already cleared. No race window — JS is single-
threaded, so the flag-check is atomic relative to other bump calls.

Test changes:
- Convert two existing tests (`'version increments on set, delete,
  clear'` and `'version does not increment on no-op set'`) to async
  with `await Promise.resolve()` after each `set()` group. The
  set/delete/clear test now also exercises the supersede path
  (clear cancels a pending set bump within the same task).
- Add two new tests pinning the load-bearing semantics: multi-set
  coalescing produces one bump, and delete supersedes a pending bump.

Bench delta on the 5k-message fixture (Playwright headless Chromium,
3-sample medians):

  load5000.actionMs cold:   ~75 ms  →  ~70 ms (modest, ~7%)
  load5000.actionMs warm:   ~75 ms  →  ~77 ms (within noise)
  load5000.loafScriptMaxMs: 0  →  0  (frame stays under 50 ms LoAF
                             ... (continued)

73 of 78 branches covered (93.59%)

Branch coverage included in aggregate %.

15 of 15 new or added lines in 1 file covered. (100.0%)

163 of 164 relevant lines covered (99.39%)

100.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 node-22 - 25125703677.1 29 Apr 2026 06:09PM UTC 2
97.52
GitHub Action Run
Source Files on build 25125703677
  • Tree
  • List 2
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25125703677
  • e84ba799 on github
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc