Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2024-04-13 - Ultralytics YOLO Synchronous stdout Bottleneck
**Learning:** Ultralytics YOLO models by default print bounding box predictions and model details to stdout synchronously for every prediction call. Inside of loops or high-throughput batching, this blocks the main thread and introduces significant I/O latency, tanking performance.
**Action:** Always set `verbose=False` inside `.predict()` when using YOLO models in production or batch loops where logs are not explicitly needed.
Comment on lines +1 to +3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix the note date to match this change’s actual date.

The heading says 2024-04-13, but this PR was created on 2026-04-13. Keeping the exact date aligned avoids timeline confusion in project learnings.

🛠️ Proposed doc fix
-## 2024-04-13 - Ultralytics YOLO Synchronous stdout Bottleneck
+## 2026-04-13 - Ultralytics YOLO Synchronous stdout Bottleneck
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 2024-04-13 - Ultralytics YOLO Synchronous stdout Bottleneck
**Learning:** Ultralytics YOLO models by default print bounding box predictions and model details to stdout synchronously for every prediction call. Inside of loops or high-throughput batching, this blocks the main thread and introduces significant I/O latency, tanking performance.
**Action:** Always set `verbose=False` inside `.predict()` when using YOLO models in production or batch loops where logs are not explicitly needed.
## 2026-04-13 - Ultralytics YOLO Synchronous stdout Bottleneck
**Learning:** Ultralytics YOLO models by default print bounding box predictions and model details to stdout synchronously for every prediction call. Inside of loops or high-throughput batching, this blocks the main thread and introduces significant I/O latency, tanking performance.
**Action:** Always set `verbose=False` inside `.predict()` when using YOLO models in production or batch loops where logs are not explicitly needed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.jules/bolt.md around lines 1 - 3, Update the entry header date to the PR's
actual date by changing the heading text "## 2024-04-13 - Ultralytics YOLO
Synchronous stdout Bottleneck" to "## 2026-04-13 - Ultralytics YOLO Synchronous
stdout Bottleneck" so the timeline in .jules/bolt.md matches the change; leave
the rest of the note (the Learning and Action lines) unchanged.

2 changes: 2 additions & 0 deletions commonforms/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def extract_widgets(
conf=confidence,
augment=False,
imgsz=ONNX_IMAGE_SIZE,
verbose=False, # Optimization: prevent stdout blocking during loop
)
for p in pages
]
Expand All @@ -135,6 +136,7 @@ def extract_widgets(
augment=True,
imgsz=image_size,
device=self.device,
verbose=False, # Optimization: prevent stdout blocking
)

widgets = {}
Expand Down