Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation how incorrectly creating schedulers can cause excessive network usage #860 #866

Closed
Closed
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
2 changes: 2 additions & 0 deletions docs/workers_vs_schedulers.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ const workerN = 4;
While using schedulers is no more efficient for a single job, they allow for quickly executing large numbers of jobs in parallel.

When working with schedulers, note that workers added to the same scheduler should all be homogenous—they should have the same language be configured with the same parameters. Schedulers assign jobs to workers in a non-deterministic manner, so if the workers are not identical then recognition results will depend on which worker the job is assigned to.

Important Note: When workers are created one at a time for a scheduler, Chrome downloads the code and language data once for the first worker, and then uses the cached version for the later workers. However, if multiple workers are created in parallel (and the data is not already cached), Chrome appears to download new data for every worker. This behavior could cause significant issues, inflating data usage for mobile users and significantly slowing down Tesseract.js initialization times for users with slow connections. It is recommended to be mindful of this behavior when working with schedulers, especially in scenarios where multiple workers are created simultaneously.