Skip to content

DO NOT MERGE: fpdf2 greenfield planner spike - #204

Draft
yyolk wants to merge 4 commits into
masterfrom
cursor/fpdf2-greenfield-planner-spike-6387
Draft

DO NOT MERGE: fpdf2 greenfield planner spike#204
yyolk wants to merge 4 commits into
masterfrom
cursor/fpdf2-greenfield-planner-spike-6387

Conversation

@yyolk

@yyolk yyolk commented Sep 8, 2026

Copy link
Copy Markdown
Owner

DO NOT MERGE. Experimental throwaway spike. This branch will not be merged and may be deleted later.

What this is

A greenfield “what if we never ported the Ruby/Typst decisions” experiment. The Typst/parch application tree is stripped. Tiny Python package writes a yearly planner PDF with fpdf2 only.

Generate

python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/press                          # N=0, artifacts/planner-2026.pdf
.venv/bin/press --notes-pages 2
.venv/bin/press --specimen --notes-pages 2

Defaults: year 2026, Monday week start, page 106 × 144 mm portrait.

--notes-pages N: 1 daily page + N dedicated notes pages per day. N=0 (default) is the day page only, with its on-page notes panel.

Notes 1/2 for 1 January
Notes 2/2 for 1 January

Notes-pages benchmark

Full-year 2026, Monday weeks. /usr/bin/time -v around press (generate only). VM: 15 GiB RAM, 4 CPUs, no swap. Order 0 → 2 → 10 → 20 → 30 → 50 → 100. Nothing OOM’d. Last completed N=100. Died N: none. Full-year N≥2 PDFs not committed (N=100 was ~78 MB). Details: BENCH.md.

N pages wall peak RSS PDF bytes link annots named dests
0 436 1.36 s 65.6 MiB 2.6 MB 16 937 440
2 1 166 2.01 s 76.6 MiB 4.1 MB 23 142 1 170
10 4 086 4.32 s 121.7 MiB 10.1 MB 49 422 4 090
20 7 736 7.42 s 178.4 MiB 17.6 MB 82 272 7 740
30 11 386 10.21 s 233.4 MiB 25.1 MB 115 122 11 390
50 18 686 16.07 s 346.4 MiB 40.1 MB 180 822 18 690
100 36 936 31.20 s 628.7 MiB 77.7 MB 345 072 36 940

Spot-check (pypdf): day-2026-07-02 and day-2026-07-02-notes-1 exist for N≥2; day→notes-1 and notes-1→day annots resolve (N=2: pages 618↔619; N=100: 18454↔18455).

Verdict: fpdf2 just holds. RSS/time scale ~linearly (~15 KB RSS per extra notes page). N=2 is trivial; N=10–20 is a few seconds; N=100 (37k pages) finished in 31 s at 629 MiB — no Typst notes-slab RSS cliff. Cost is disk and annotation count, not layout memory.

CI

Old Typst jobs replaced with a specimen generate stub. Do not treat as product CI.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Throwaway greenfield experiment: cover/year/quarter/month/week/day
pages, section nav, and calendar page links. Do not merge.

Co-authored-by: Joseph Chiocchi <joe@yolk.cc>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

cursoragent and others added 3 commits September 8, 2026 19:38
Full year is 436 pages / ~2.6 MB. Document link checks against pypdf
named destinations and annotation rects.

Co-authored-by: Joseph Chiocchi <joe@yolk.cc>
Default N=0 keeps the on-page notes panel only. Day chips to notes-1;
notes pages chip back to the day and prev/next notes. Bench runner
covers N=0,2,10,20,30,50,100 and stops on OOM.

Co-authored-by: Joseph Chiocchi <joe@yolk.cc>
Full-year 2026 held at 36936 pages / 31s / 629 MiB peak RSS. Commit
N=2 specimen only; leave huge full-year PDFs untracked.

Co-authored-by: Joseph Chiocchi <joe@yolk.cc>
cursor Bot pushed a commit that referenced this pull request Sep 8, 2026
Full-year 2026 matrix 0→100 via /usr/bin/time -v. Nothing OOM'd.
N=100 was 26s / 518 MiB. Spot-check day↔notes with pypdf.

Co-authored-by: Joseph Chiocchi <joe@yolk.cc>
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