3 Commits

Author SHA1 Message Date
Jeroen Nijhof
cda4ee0c50 Speed up find-german-comments: speed up text_cat -s
follow-up commit to https://gerrit.libreoffice.org/#/c/9226/ .

text_cat -s was documented as "Not very efficient yet, because
language models are re-loaded after each line." So if we want
to use text_cat -s for thousands of lines, better
read the language models only once and store them.

When tested on svl/source, the speed-up was a futher factor 1.5
(reduced from 6 s to 4 s).

Change-Id: I654a250b0e369e01c5eac5970b64df1390f0ef35
Reviewed-on: https://gerrit.libreoffice.org/9227
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-05-02 09:15:51 +00:00
Jeroen Nijhof
6efd972591 Speed up find-german-comments
Instead of recreating a text_cat sub-process for every string, start a
single text-cat process (with the -s flag, "per line") and reuse that.

Testing on svl/source shows a speed-up of 7.5 x, down from 45.6s to 6.1s!

To avoid blocking on the pipes set autoflush in text-cat, and use
read_line instead of read on the find-german-comments side.

Change-Id: Ic6c00fc3c1e7cbcbbfff65512bf54ad11f900697
Reviewed-on: https://gerrit.libreoffice.org/9226
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-05-02 09:13:13 +00:00
Miklos Vajna
7be59837a9 move find-german-comments from build repo to bootstrap/bin 2011-01-06 13:30:56 +01:00