Skip to content

perf(check): skip the layout check of a film that passed and has not changed since - #107

Merged
umiyosh merged 1 commit into
masterfrom
feat/issue-94-skip-layout
Nov 18, 2026
Merged

umiyosh merged 1 commit into
masterfrom
feat/issue-94-skip-layout

Conversation

@umiyosh

@umiyosh umiyosh commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Fixes #94. Part of #87.

Summary

check, preview and build no longer run the layout check again on a film that passed it and has not changed. They print layout: ok (unchanged since 01:40:25) instead.

Why

Each run of the layout check takes 8–25 s. The #87 trial ran it 13 times. Most of those were preview runs while fixing sync, and build right after a passing preview.

How

Part Behavior
The record When the whole film passes, film/.layout-ok stores a SHA-256 of every file under film/. The hash also covers the check's own code (layout.ts, snapshot.js, repeat.ts), so a new version of the check runs again.
When the check is skipped checkBeforeCapture (used by preview and build) and the check command skip it when the record matches
What still runs A check of scene files always runs, and only a whole film's pass is recorded
#49 Not brought back. The check already runs on pages of its own, and frames are drawn on new pages, so skipping it changes no frame.

Test

  • New tests/layoutcache.test.ts:
    • The record returns the pass time, and is forgotten when any file of the film changes.
    • The record is left out of its own hash.
    • Running the check command twice skips the second run, but not a scene-file check.
  • make check passes.

@umiyosh
umiyosh merged commit 07ee988 into master Nov 18, 2026
1 check passed
@umiyosh
umiyosh deleted the feat/issue-94-skip-layout branch November 18, 2026 16:14
@umiyosh umiyosh mentioned this pull request Nov 18, 2026
1 of 2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check: skip the layout check when the film has not changed

1 participant