Skip to content

perf(dump): add --exclude so deploy-pages skips generating the game dump - #47

Merged
Seungpyo1007 merged 1 commit into
mainfrom
perf/dump-exclude-collections
Jul 28, 2026
Merged

perf(dump): add --exclude so deploy-pages skips generating the game dump#47
Seungpyo1007 merged 1 commit into
mainfrom
perf/dump-exclude-collections

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

Problem

deploy-pages regenerates the full dump (python -m app.dump), then #46 deletes _site/v1/games before upload. So the build spends hours writing ~962k per-record game files that are thrown away — the last successful deploy took 5h26m, almost all of it in Generate static JSON dump.

Change

Add a repeatable --exclude COLLECTION flag to the dump CLI.

generate() already accepted a collections list, so this only threads it through run() and argparse via a small resolve_collections() helper:

python -m app.dump --output dump --exclude games
  • Unknown names raise rather than being silently ignored, so a typo in a workflow fails loudly instead of quietly dumping everything.
  • Order of COLLECTIONS is preserved; the run summary reports what was skipped.
  • deploy-pages now passes --exclude games, which makes the post-hoc rm -rf _site/v1/games + manifest surgery from ci(pages): exclude game dump from Pages deploy (fixes syncing_files timeout) #46 unnecessary — the manifest is written without games to begin with. Net −20/+6 lines in the workflow.

Games remain available as versioned data in the TechAPI repo; all other collections are published exactly as before.

Verification

Ran locally against the engine:

  • python -m app.dump --help shows the new flag
  • resolve_collections() → 12 collections by default, 11 with --exclude games, ValueError on a typo
  • ruff check app tests ✅ · mypy app/dump.py
  • 3 new tests in tests/integration/test_dump.py (defaults / exclusion+order / unknown-name) pass

Follow-up to #45 and #46.

`python -m app.dump` regenerates every collection. With ~962k games the
Pages build spent hours writing per-record files that the assemble step
then deleted before upload (the last deploy ran 5h26m).

Add a repeatable `--exclude COLLECTION` flag: `generate()` already accepted
a `collections` list, so this just threads it through `run()` and the CLI
via a new `resolve_collections()` helper. Unknown names raise instead of
being ignored, so a typo in a workflow fails loudly.

deploy-pages now runs `--exclude games`, which drops the wasted generation
work and makes the post-hoc `rm -rf _site/v1/games` + manifest edit
unnecessary (the manifest is written without games to begin with).
@Seungpyo1007
Seungpyo1007 merged commit 61854d9 into main Jul 28, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the perf/dump-exclude-collections branch July 28, 2026 05:37
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.

1 participant