manisandro / gImageReader

A Gtk/Qt front-end to tesseract-ocr.
GNU General Public License v3.0
1.62k stars 190 forks source link

gimagereader-gtk is slow on ubuntu #622

Closed Dominik-rueth closed 1 year ago

Dominik-rueth commented 1 year ago

I was a happy user of gimagereader-gtk, but for a few month (I can't give a precise date), image processing is very slow on the latest gimagereader with the GTK frontend on Ubuntu (Kinetic). We also tried using the lastest 3.4.1 from manisandro's PPA, to the same effect. This problem does not occur with the QT5 frontend - which is fast.

Steps to reproduce:

  1. Install gimagereader on ubuntu-kinetic
  2. Open a PNG file in gimagerader
  3. click on "recognize all"
  4. Note that the progress bar advances very slowly; even for a few lines, it takes a few minutes.

Is there any further information that we could supply to help debug this problem?

Dominik-rueth commented 1 year ago

cc @saraedum

manisandro commented 1 year ago

Does

$ export OMP_THREAD_LIMIT=1

before running gimagereader-gtk help?

Dominik-rueth commented 1 year ago

Yes, it does. So I typed into the console:

(base) dominik@xps:~$ export OMP_THREAD_LIMIT=1 (base) dominik@xps:~$ gimagereader-gtk

and then it processed the text quickly.

Dominik-rueth commented 1 year ago

Thank you for the quick reply!

manisandro commented 1 year ago

You should ask the ubuntu tesseract maintainer to compile tesseract with OpenMP support disabled.