koreader / koreader-base

Base framework offering a Lua scriptable environment for creating document readers
http://koreader.rocks/
GNU Affero General Public License v3.0
136 stars 106 forks source link

update leptonica, tesseract, and libk2pdfopt #1800

Closed benoit-pierre closed 5 months ago

benoit-pierre commented 5 months ago

Depend on https://github.com/koreader/libk2pdfopt/pull/49.

Thanks to some upstream cleanups in tesseract, the resulting code size (bss+data+text) is reduced by ~1.4-2.3 MB.

Note: tesseract is compiled with legacy engine support, which means the resulting mode after initialization will depend on the type of language data available:

AFAIK, there are no legacy only language files.

I tested both modes, English only with tessdata & tessdata-fast, and it did not seem to make a difference (which might just mean that the fallback on legacy was never triggered). Disabling the legacy engine would save an additional ~500 KB. But I don't know if the new engine is (always) better, especially for other languages.

The version used by Linux distributions seem to vary: for example Arch Linux is using the English tessdata variant, while Ubuntu uses tessdata-fast. ¯\(ツ)


This change is Reviewable

Frenzie commented 5 months ago

I tested both modes, English only with tessdata & tessdata-fast, and it did not seem to make a difference (which might just mean that the fallback on legacy was never triggered).

You mean on a device I presume?

benoit-pierre commented 5 months ago

I tested both modes, English only with tessdata & tessdata-fast, and it did not seem to make a difference (which might just mean that the fallback on legacy was never triggered).

You mean on a device I presume?

Mainly with the emulator.