Skip to content

perf(scripts): parallelize Mermaid rendering and optimize EPUB build#61

Open
yzkykr0721-crypto wants to merge 1 commit intoluongnv89:mainfrom
yzkykr0721-crypto:main
Open

perf(scripts): parallelize Mermaid rendering and optimize EPUB build#61
yzkykr0721-crypto wants to merge 1 commit intoluongnv89:mainfrom
yzkykr0721-crypto:main

Conversation

@yzkykr0721-crypto
Copy link
Copy Markdown

  • Use ThreadPoolExecutor for parallel Mermaid diagram rendering (4 workers)
  • Pre-compile regex patterns at module level (MERMAID_PATTERN, MERMAID_NUMBERED_LIST_PATTERN)
  • Combine SVG and link processing into single BeautifulSoup parse
  • Fix double file iteration in check_cross_references.py

Build time reduced from ~2.5 minutes to ~38 seconds (6x faster)

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

- Use ThreadPoolExecutor for parallel Mermaid diagram rendering (4 workers)
- Pre-compile regex patterns at module level (MERMAID_PATTERN, MERMAID_NUMBERED_LIST_PATTERN)
- Combine SVG and link processing into single BeautifulSoup parse
- Fix double file iteration in check_cross_references.py

Build time reduced from ~2.5 minutes to ~38 seconds (6x faster)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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