Performance optimization

Hi,
we are using LT 5.0 library, mostly for word by word spellchecking (one word at time). For English language working fine (around 50-100ms per jLanguageTool.check(inputText) method calling), however, after switching for some another language, we have performance decreasing in several times (around 2500-3000ms per jLanguageTool.check(inputText) method calling).

Also, I have noticed, that with categories disabling (PUNCTUATION, CASING, etc.) I have performance increasing in my tests. So, I assume we can optimize the DE words checking with disabling some categories from the code perspective.

Could you give me a hint which categories are significally reduce the check() method performance? Which of them I can definitely disable for one word spellchecking?
Maybe some another performance tips are existing?

Many thanks in advance!

The more rules you disable, the faster checking will be (down to some baseline, as the text needs to be analyzed once anyway). Also, make sure the JLanguageTool object is created only once.

The JLanguageTool object creation time (~100ms) is not so critical comparing with invoking jLanguageTool.check(inputText) method with DE language of input text (~ 1000-3000ms). However, thanks for the tip!

Actually, I have played with rule categories disabling and figure out that CategoryIds.TYPOS is most greedy category. As it takes 90% of checking time. It means that disabling all other categories give me a speed-up only in 10%, but disabling TYPOS is not accepted for our case. Do you have any ideas what we also can do or can disable?
Maybe there some specific greedy rules exists…

I don’t think there’s a specific rule that could be disabled to speed things up.

I also have checked response time on your Grammar Checker (https://languagetool.org/). The time of responses with German language much faster (200-500ms) then in my tests with using LT 5.0. Is it possible that the latest version has some performance improvements?
Or is it more related to hardware?

LT 5.0 is really old, a lot has changed since then.