Skip to content

feat!(config): global concurrency setting - #44

Merged
QQSHI13 merged 1 commit into
mainfrom
feat/global-concurrency
Aug 18, 2026
Merged

feat!(config): global concurrency setting#44
QQSHI13 merged 1 commit into
mainfrom
feat/global-concurrency

Conversation

@QQSHI13

@QQSHI13 QQSHI13 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

What

  • Global concurrency key (default: CPU count − 1, same schema as the old plugin options) — routes all ThreadPoolExecutor pools through it:
    • build.py ×2 (Markdown render, page build) — was min(32, cpu)
    • tikz.py (diagram compile) — was min(4, n)
    • social.py card + card-layer pools — now sized in on_config (global config is not available in on_startup)
    • privacy.py download pool
  • Breaking: social/privacy plugin-level concurrency options removed → plugin-level usage now warns (unknown key) and is ignored; set top-level concurrency:.
  • PDF tabs memory-capped: base = --jobs, else global concurrency; capped by available memory (~200 MiB/tab via /proc/meminfo or SC_AVPHYS_PAGES).
  • Docs (en+zh) + changelog (en+zh); tests updated (social/privacy config, new _tabs_from_memory unit tests).

New top-level `concurrency` key (default: CPU count - 1) sizes every
parallel pool: Markdown page rendering, page building, TikZ compilation,
social card generation and privacy downloads. The plugin-level
`concurrency` options of social and privacy are removed (breaking;
plugin-level usage now warns and is ignored).

PDF export tabs now come from --jobs, else global concurrency, and are
capped by remaining memory (~200 MiB per Chromium tab) so parallel
rendering can't OOM the build.

Docs (en+zh) and changelog (en+zh) updated.
@QQSHI13
QQSHI13 merged commit 584bbe3 into main Aug 18, 2026
8 checks passed
@QQSHI13
QQSHI13 deleted the feat/global-concurrency branch August 18, 2026 11:47
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