Multithreading assessment - #30
Conversation
Replace serial file/diagram validation with a bounded concurrent\nscheduler that preserves deterministic output ordering.\n\nAdd global diagram task ordinals, ordered emission, and max-concurrency\nclamping to max(1, cpu_count - 1).\n\nExpand coverage with unit, integration, and pytest-bdd scenarios for\nout-of-order completion, concurrency caps, and error handling.\n\nAdd performance benchmarking support with hyperfine and copied fixture\ndocument sets.\n\nUpdate Python requirement to 3.14, document the new design, and align\nREADME/CHANGELOG with runtime behavior.
Mark the execution plan complete and record final outcomes,\nbenchmark observations, and documentation-gate scoping decisions.
Use npx for markdownlint and uv run for nixie so markdown quality\ngates run without globally installed binaries.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2c5f96108
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| running_tasks = [ | ||
| asyncio.create_task( | ||
| _run_diagram_task( | ||
| task, | ||
| cfg_path, |
There was a problem hiding this comment.
Avoid creating a task for every diagram upfront
This eagerly materializes one asyncio.Task per diagram before any results are consumed, so repositories with many Mermaid blocks can allocate a very large number of pending tasks and associated state at once. The semaphore only limits how many tasks enter _run_diagram_task concurrently; it does not bound total queued tasks, so --max-concurrency no longer caps overall memory/scheduling pressure and large runs can become memory-heavy or unstable.
Useful? React with 👍 / 👎.
No description provided.