Skip to content

feat: add Nuitka build trial for faster cold-start times#3

Open
mrspence wants to merge 2 commits into
mainfrom
claude/optimize-nuitka-build-011CUQu89rLrj1QA7F8WEoRX
Open

feat: add Nuitka build trial for faster cold-start times#3
mrspence wants to merge 2 commits into
mainfrom
claude/optimize-nuitka-build-011CUQu89rLrj1QA7F8WEoRX

Conversation

@mrspence

Copy link
Copy Markdown
Contributor

Implements feature request from issue #2 to trial Nuitka compilation for potentially faster cold-start times compared to PyInstaller.

Changes:

  • Add new CI workflow (nuitka-trial.yml) that builds binaries using Nuitka
  • Create build_nuitka.py script for Nuitka compilation
  • Add requirements-nuitka.txt with Nuitka dependencies
  • Include test.html for automated testing in CI
  • Workflow tests binary with test.html > test.md conversion
  • Measures and reports cold-start times across platforms (Linux, macOS, Windows)
  • Compares warm-start performance with multiple runs
  • Outputs binary size and conversion results as artifacts

The CI workflow will:

  1. Build standalone binaries using Nuitka on all platforms
  2. Test conversion with test.html file
  3. Measure cold-start performance
  4. Upload binary artifacts for comparison
  5. Output test.md results for verification

This allows comparison of Nuitka vs PyInstaller for:

  • Cold-start execution time
  • Binary size
  • Compilation time
  • Overall performance

Implements feature request from issue #2 to trial Nuitka compilation
for potentially faster cold-start times compared to PyInstaller.

Changes:
- Add new CI workflow (nuitka-trial.yml) that builds binaries using Nuitka
- Create build_nuitka.py script for Nuitka compilation
- Add requirements-nuitka.txt with Nuitka dependencies
- Include test.html for automated testing in CI
- Workflow tests binary with test.html > test.md conversion
- Measures and reports cold-start times across platforms (Linux, macOS, Windows)
- Compares warm-start performance with multiple runs
- Outputs binary size and conversion results as artifacts

The CI workflow will:
1. Build standalone binaries using Nuitka on all platforms
2. Test conversion with test.html file
3. Measure cold-start performance
4. Upload binary artifacts for comparison
5. Output test.md results for verification

This allows comparison of Nuitka vs PyInstaller for:
- Cold-start execution time
- Binary size
- Compilation time
- Overall performance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The previous configuration used --follow-imports which attempts to compile
the entire Python standard library and all dependencies, causing builds to
hang or take hours.

Changes to build_nuitka.py:
- Replace --follow-imports with --follow-import-to=markitdown
  (only compile markitdown package specifically)
- Remove redundant --include-package directives
- Add --show-progress for build visibility
- Add --assume-yes-for-downloads to prevent prompts
- Disable LTO (--lto=no) to speed up compilation
- Remove --macos-create-app-bundle (not needed for CLI)

Changes to nuitka-trial.yml:
- Add 60-minute timeout to entire job
- Add 30-minute timeout to build steps
- Prevents CI from running indefinitely

These optimizations should reduce build time from hours to ~10-15 minutes
while still producing a functional standalone binary.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <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