Skip to content

Add PROJECT-OPTIMIZE-PREVIEWS.md: fast preview builds research and roadmap - #93

Merged
mmcky merged 1 commit into
mainfrom
docs/project-optimize-previews
Jul 2, 2026
Merged

Add PROJECT-OPTIMIZE-PREVIEWS.md: fast preview builds research and roadmap#93
mmcky merged 1 commit into
mainfrom
docs/project-optimize-previews

Conversation

@mmcky

@mmcky mmcky commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the research and design document behind tracking issue #92: how to make PR preview builds as fast as possible across the lecture repos, using a mix of caching, container, and workflow strategies. Also adds a README pointer line. (References to #92 are intentionally non-closing — the tracking issue stays open while phases land.)

What's in the doc

Measured baseline — step-level timings from real consumer runs: a warm lecture-dp preview spends 75% of its 2.7 min pulling the container (the build itself is 22s); lecture-python.myst spends ~8.3 of its 17 min building PDF/notebook formats previews never show; the 40-minute cold builds were a silent cache-freshness failure (#83), not inherent cost. Container layer analysis shows 1,233 MB of the 2,741 MB lean-image pull is TeXLive, unused by HTML-only previews.

Target architecture — per repo class: a TeX-free quantecon-preview image + three cache planes (weekly anchor, cache-on-merge, PR-scoped save) for container repos; HTML-only previews + AMI-baked environment + shallow checkout for the GPU repo; instant placeholder PR comments, concurrency cancellation, and paths filters for both.

Three-phase roadmap with verified savings per item — Phase 1 alone (all small, independently shippable changes) takes lecture-python.myst from ~17 min to ~8–9 min and makes the 40-min cold class ~10× rarer, loud, and once-per-PR.

Rejected alternatives with refutations (single-page draft builds, Sphinx -j, dropping containers for a conda cache, migrating the GPU repo to CPU, and more) so they aren't re-litigated, plus open questions and pilot gates.

Expected results

Scenario Today After Phase 1 End state
lecture-dp small edit ~2.7 min ~2.2–2.5 min ~1.5–2.5 min incl. deploy; links at ~20s
lecture-dp cold miss ~40 min, silent ~10× rarer, loud, once per PR ~18–28 min, rare
lecture-python.myst PR ~17 min ~8–9 min ~3.5–5 min

Verification

Every recommendation was adversarially verified against the action sources in this repo, the live consumer workflows (lecture-dp, lecture-python.myst), and platform behavior; savings estimates were corrected where verification tightened them (e.g. zstd saves ~20–35s, not the naive 45s; parallel execution gives 1.5–2.5×, not 4×).

Tracking issue: #92 · Related: PLAN.md backlog (this includes its P0), QuantEcon/meta#327 (preview unification).

🤖 Generated with Claude Code

…admap

Design notes for making PR preview builds as fast as possible, tracked
in #92. Grounded in measured step-level timings from real consumer
runs: a warm lecture-dp preview spends 75% of its 2.7 min pulling the
container; lecture-python.myst spends ~8.3 of its 17 min building PDF
and notebook formats previews never show; the 40-minute cold builds
were a silent cache-freshness failure (see #83), not inherent cost.

The doc covers: measured baseline + container layer analysis (1.2GB of
every pull is TeX an HTML preview never uses), target architecture per
repo class, before/after time budgets, a three-phase roadmap with
verified savings estimates, rejected alternatives with refutations
(single-page builds, Sphinx -j, CPU migration of the GPU repo, conda
cache instead of containers), and open questions.

Every recommendation was adversarially verified against the code in
this repo, the consumer workflows, and platform behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 2, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a project-level research/design document that captures measured baseline timings and a phased roadmap for speeding up PR preview builds across QuantEcon lecture repositories, and links it from the repo README so contributors can discover it.

Changes:

  • Add PROJECT-OPTIMIZE-PREVIEWS.md documenting preview build timing analysis, target architecture, and a three-phase optimization plan (tracking issue #92).
  • Add a README documentation index entry pointing to the new project document.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
README.md Adds a documentation index link to the new preview-optimization project doc (with tracking issue #92).
PROJECT-OPTIMIZE-PREVIEWS.md New research/design/roadmap document for optimizing PR preview build speed across repo classes.

@mmcky
mmcky merged commit de75041 into main Jul 2, 2026
1 check passed
@mmcky
mmcky deleted the docs/project-optimize-previews branch July 2, 2026 11:26
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.

2 participants