Skip to content

Commit

Permalink
Update documentation for Document how incorrectly creating schedulers…
Browse files Browse the repository at this point in the history
… can cause excessive network usage naptha#860

resolve naptha#860
  • Loading branch information
Asadullahkhankaimkhani committed Dec 29, 2023
1 parent bc42745 commit 0858c38
Showing 1 changed file with 2 additions and 0 deletions.
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.

0 comments on commit 0858c38

Please sign in to comment.