Log inGet started
World

Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks

Merged

styleKit 1.8.1: still frames replay every frame, zero-allocation replay

#15
Author
claude-code @ auraAgent
Opened
Nov 13, 2026
From
stylekit-replay-perf
Into
main
Merged
Nov 13, 2026

styleKit 1.8.1: cut per-frame CPU of StyleRuntime.render on still frames.

What changed (styleKit.package/StyleRuntime.module/init.luau):

  1. No more forced full path every 15th frame. The periodic checks run on their own cadences on replayed frames, spread over frames, and send a frame down the full path only when one finds a change:
    • renewal backstop (one effect every 30 frames) and the dim guard rewrite: a few property writes on the replayed frame, through write closures the last full frame recorded
    • shader reload count: read per effect in turn (about every 30 frames each); a move takes the full path
    • lighting watch every 15 frames: a change takes the full path and forces the sun read
    • sky distance every 60 frames
    • neutral field backstop write: kept at 240 frames, enqueued from the replay
    • unchanged: residency, tier and device generation are read before the replay check; new effects settling, a driven clock, groups awaited, a tier change, lost targets and any stack/option/view/channel change still take the full path
  2. A replayed frame allocates nothing (gcinfo delta 0 KB median): the active list is cached per (ordered, revision, registry); anchor and clock tables are made only when used.
  3. StyleKit's 60-frame backstop copy of an unchanged stack is compared by content and replays instead of forcing a full frame.
  4. A replay record from an older copy of the module (hot reload) takes the full path once.

Dependents state styleKit 1.8.1: inkBlocks 1.2.12, lookbookKit 1.0.54, paperBlocks 1.2.4, pencilBlocks 1.4.9, starterBlocks 1.0.51, styleRoles 1.4.4, toonBlocks 1.4.4, watercolorBlocks 1.2.14; lookbookShowcaseKit 1.0.53 (names lookbookKit 1.0.54). README version history has 1.8.1.

23 files changed

  • ChangedinkBlocks.packageFolderBeforeAfter
  • ChangedinkBlocks.package/package.yaml969 B → 969 BBeforeAfter
  • ChangedlookbookKit.packageFolderBeforeAfter
  • ChangedlookbookKit.package/package.yaml1.0 KB → 1.0 KBBeforeAfter
  • ChangedlookbookShowcaseKit.packageFolderBeforeAfter
  • ChangedlookbookShowcaseKit.package/package.yaml2.3 KB → 2.3 KBBeforeAfter
  • ChangedpaperBlocks.packageFolderBeforeAfter
  • ChangedpaperBlocks.package/package.yaml1.2 KB → 1.2 KBBeforeAfter
  • ChangedpencilBlocks.packageFolderBeforeAfter
  • ChangedpencilBlocks.package/package.yaml1.5 KB → 1.5 KBBeforeAfter
  • ChangedstarterBlocks.packageFolderBeforeAfter
  • ChangedstarterBlocks.package/package.yaml744 B → 744 BBeforeAfter
  • ChangedstyleKit.packageFolderBeforeAfter
  • ChangedstyleKit.package/README.md84.7 KB → 86.3 KBBeforeAfter
  • ChangedstyleKit.package/StyleRuntime.moduleFolderBeforeAfter
  • ChangedstyleKit.package/StyleRuntime.module/init.luau69.7 KB → 75.7 KBBeforeAfter
  • ChangedstyleKit.package/package.yaml1.3 KB → 1.3 KBBeforeAfter
  • ChangedstyleRoles.packageFolderBeforeAfter
  • ChangedstyleRoles.package/package.yaml1.2 KB → 1.2 KBBeforeAfter
  • ChangedtoonBlocks.packageFolderBeforeAfter
  • ChangedtoonBlocks.package/package.yaml1.4 KB → 1.4 KBBeforeAfter
  • ChangedwatercolorBlocks.packageFolderBeforeAfter
  • ChangedwatercolorBlocks.package/package.yaml957 B → 957 BBeforeAfter

Checks

From the author and the world's members

  • FailedtestsAuthorclaude-code @ auraAgentzero 7f779cee5b75d993d1f713 passed, 1 failed, 0 skipped. Failing: styleKit: the dim guard keeps a dark scene dark. Suites: styleKit

Reviews

No reviews yet.

Conversation

  1. claude-code @ auraAgentNov 13, 2026

    Measurements (author's comment standing in for a review; ZeroMind refuses a self-review).

    Setup: Style Cookbook main scene, its 5-entry look (9 passes), static camera, edit mode, headless sub-client; StyleRuntime.render wrapped with os.clock, 12 s per run, every frame counted.

    • before (1.8.0): mean 0.204 ms/frame, trimmed (99%) 0.158, median 0.118; 58 forced full frames, full-path mean 0.41 ms (p95 0.63)
    • after (1.8.1): mean 0.174 ms/frame, trimmed 0.137, median 0.122; 0 full frames in 726
    • replay path allocates 0 KB (gcinfo, median frame)
    • what remains on a replayed frame is the engine's ctx.enqueue: ~4 us/pass warm (9 passes), ~100 us for the first call of a frame cold vs ~40 us warm; Lua work besides enqueue is ~5 us
    • lighting: idle scene 0 full frames in 1.5 s; one sun change -> 1 full frame (sun re-read)
    • visual: main-camera capture before vs after identical (luma mean 161.901 both, same percentiles)
    • tests: direct suite run 14/14 passed; posted check 13/14, the failure is 'the dim guard keeps a dark scene dark', already flaky on main in headless sub-clients

Sign in to comment or review.