Why is LTeX slow when I'm writing LaTeX? #20
-
When I wrote some sentences in the VS code and Ltex checked my spelling or grammar errors, my fan in computer run fastly. The checking speed seems too slow to run as a constant programmar. Did I set something wrong or it's just designed for after-writing checking. By the way, the quick error correction(I don't know it's real name) runs slowly as well. And thanks for your extentions, I like it very much and hope it become better. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
@xiajunwen1007 Thanks for your question. It may well take over a minute after opening a long LATEX document until it has been fully checked and errors are displayed. This is just because of LanguageTool, so we can't really improve here. However, you seem to be asking about the speed when editing a document that has already been checked. For example, you just insert a sentence or change a word. This should be pretty fast, as LanguageTool internally caches the results for the last 2000 sentences (you can change this number via the setting Here is a real-time example of me editing a long document (over 1100 lines) after it has been fully checked for the first time - it's really fast: It might be language-dependent, e.g., maybe checking Chinese takes more time than checking English. Another possibility would be that your PC is too weak. Try changing the |
Beta Was this translation helpful? Give feedback.
-
@xiajunwen1007 I assumed this has answered your question. If you come across a specific bug in LTEX that negatively affects its performance, feel free to open another issue. |
Beta Was this translation helpful? Give feedback.
-
This might be related to #29, which has been fixed in 4.9.1. This applies if you had any matches ignored by the "ignore rule in this sentence" quick fix. |
Beta Was this translation helpful? Give feedback.
-
Hi @valentjn. For others that come across this: LTeX slows down considerably if I have multiple files open and the 'problems' identified by LTeX are in the thousands. This issue goes away when I only have one or two documents / files open in Visual Studio Code... great extension, by the way! Much appreciated. |
Beta Was this translation helpful? Give feedback.
@xiajunwen1007 Thanks for your question. It may well take over a minute after opening a long LATEX document until it has been fully checked and errors are displayed. This is just because of LanguageTool, so we can't really improve here.
However, you seem to be asking about the speed when editing a document that has already been checked. For example, you just insert a sentence or change a word. This should be pretty fast, as LanguageTool internally caches the results for the last 2000 sentences (you can change this number via the setting
ltex.performance.sentenceCacheSize
) that have been checked. So only the sentences, that actually changed or have been added, have to be re-checked.Here i…