Hi, I’ve been working on a small uni project comprising a simple grammar checker for a minority language to be used inLibreOffice.
It’s mostly written in perl but the job of handling the proofreading is coded in java and works quite like your languagetool but on a far lesser level.
It’s all working quite well apart from one problem…it (LibreOffice) takes a very long time to process the errors when the doProofreading() method returns the ‘ProofreadingResult’
Here is some output showing the time taken from return from doProofreading() until reEntry into doProofreading() …or ‘time in LibreOffice’
Time in LO : 57620 ms
Time in LO : 1544 ms
Time in LO : 1432 ms
Time in LO : 3891 ms
Time in LO : 2985 ms
Time in LO : 6764 ms
Time in LO : 3686 ms
Time in LO : 1261 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 2 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 0 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 1 ms
Time in LO : 1 ms
This is a very typical pattern…first few returns are very slow…then it flies!!
The contents of the text have no bearing on the performance…if I take one of the ‘slow paragraphs’ &
put it at the bottom of the text it performs as expected (<=1ms).
Also for a larger text there are more ‘slow paragraphs’ it is not always 8 as in this case.
I would really appreciate any advice you could give me on this as I’m completely flummoxed as to why this could be happening…all ProofreadingResults are being created in exactly the same manner.
As I say, the results are good, but it’s so slow as to render it useless…please help if you can!!!
Thanks a million for any help you can give,
Ciaran.