Closed dmalyuta closed 7 years ago
It might be the normal behavior, or at least, you are not alone.
I can notice very slow syntax check for some files too (or maybe they get slower?), never investigated this/ It's possible something is wrong somewhere. To get a quick idea, it is possible to measure libclang time, to see if it's where all the time is spent. Even if the work happens in libclang, it could be some configuration issue.
Personally, I actually kill my irony-server from time to time when I observe that the memory consumption becomes too high...somehow I restart Emacs enough often that it does not bother me so much but it's not really an acceptable behavior.
I see. Just two questions then:
clang_reparseTranslationUnit()
. This libclang function is supposed to be where the time is spent, other stuff is just glue code.The second request, ask for the Irony::diagnostics() of the previous parse, this is supposed fast except maybe if there is an enormous amount of diagnostics.
Then you can add timings in https://github.com/Sarcasm/irony-mode/blob/bfe703a4c0e91a960c606bf2420b1f118e53a0a6/irony-diagnostics.el or https://github.com/Sarcasm/flycheck-irony/.
If the time spent from elisp side minus the time spent in Clang is noticeably different, then something is wrong.
In this configuration, the lifetime of irony-server is necessary a subset of Emacs lifetime.
Ok, thanks for explaining :)
I'm working on a modestly sized C++ project. flycheck-irony works well, the syntax checking is asynchronous however it takes about 10 seconds for flycheck to update its error highlights in the buffer. Between purposefully introducing a syntax error and the error being shown by flycheck, I see
FlyC*
in the mode line and in the system monitorirony-server
sometimes uses up to 400 MiB RAM and 8% CPU. Is this normal behavior?