Skip to content

Give each worker its share of OpenCV's threads - #325

Merged
abrignoni merged 1 commit into
mainfrom
fix/opencv-threads-per-worker
Oct 30, 2026
Merged

abrignoni merged 1 commit into
mainfrom
fix/opencv-threads-per-worker

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Processing now gives each worker its share of OpenCV's threads (OpenCV's count divided by the workers), instead of one thread each whenever there is more than one worker.

  • On 12 logical processors, 4,000 photos with screening, 4 workers: 70.4 and 72.0 files/s before, 86.2 and 86.6 after. 8 workers still get one thread each.
  • Stored results were identical on every row.
  • Not yet measured on Windows.

🤖 Generated with Claude Code

Processing set OpenCV to one thread whenever there was more than one worker,
which left cores idle when the workers were fewer than the processors. On 12
logical processors, 4,000 photos with screening, 4 workers ran at 70.4 and
72.0 files/s; with each worker taking OpenCV's count divided by the workers,
86.2 and 86.6. At 8 workers it is one thread each, as before. Stored results
were the same on every row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@abrignoni
abrignoni merged commit a2c806e into main Oct 30, 2026
7 checks passed
@abrignoni
abrignoni deleted the fix/opencv-threads-per-worker branch October 31, 2026 01:49
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