OCR SDK Knowledge Base

Article ID: 646 | Category: General Questions | Type: How To | Last Modified: 2/21/2013

Parallel Pocessing in Java


How can I take advantage of parallel processing in Java?


1. Via FREngine API

Process the document using the FRDocument object  with  MultiProcessingMode = MPM_Sequential or MultiProcessingMode = MPM_Auto (you can find out more about parallel processing in Help > Guided Tour > Advanced Techniques > Parallel Processing).
Note that processing with the Batch Processor is not available in Java as callbacks are still not supported.

2. Other ways

2.1. Process  (analyze, recognize, synthesize, export) each document in a separate process.

The number of processes: the same as the number of processor cores. [The number of processes cannot exceed the number of processor cores.]

Engine loading: you can use all of the engine loading methods described in Help > Guided Tour  > Advanced Techniques > Programming Aspects > Different Ways to Load Engine.

2.2. Process each document in a single thread.

Engine loading: every thread should create its own OutprocLoader for working with FREngine.

Using several InprocLoaders in a single process and using one OutprocLoader in different threads do not lead to parallel processing.

It is better to use FRDocument object  with  MultiProcessingMode = MPM_Sequential for the methods described in 2.1 and 2.2.

You can find other ways to increase processing speed in Help > Guided Tour > Best Practices > Increasing Processing Speed.

356 people think this is helpful.
Was this information helpful to you?