thiagoalessio / tesseract-ocr-for-php

A wrapper to work with Tesseract OCR inside PHP.
https://packagist.org/packages/thiagoalessio/tesseract_ocr
MIT License
2.87k stars 551 forks source link

Sleep for 1 ms while waiting to yield CPU #241

Closed mal-risma closed 1 year ago

mal-risma commented 1 year ago

Description

When waiting for tesseract the CPU of the PHP process runs at 100% on a single core. This change introduces a 1ms sleep to yield the cpu for other processes.

thiagoalessio commented 1 year ago

Thank you so much for taking the time to contribute back to this library ❤️

mal-risma commented 1 year ago

My pleasure. Thank you merging it so fast!

mal-risma commented 1 year ago

Any change you could give it a version number, so it gets updated on packagist?

thiagoalessio commented 1 year ago

sure, there you go: https://packagist.org/packages/thiagoalessio/tesseract_ocr#2.13.0