Closed VhJoren closed 4 years ago
Do you have Evince installed? In one or two alpha releases, 78 or 79, there was a bug causing high cpu usage. Please update to 0.7-alpha.81 in any case. Does the alpha release actually work in 2020.1? If I remember correctly I raised the Since build because there were crashes from using functionality that did not yet exist in 2020.1 (though that was in IntelliJ).
Thanks for reporting the exception by the way, it is caused by a recent change I made for #1512, and could happen any time you press enter.
Do you have Evince installed? In one or two alpha releases, 78 or 79, there was a bug causing high cpu usage. Please update to 0.7-alpha.81 in any case.
Yes, I do use Evince, but that should not be related, as I do not use the 'sync-with-pdf' feature (or whathever it is called. I use my own scripts to compile latex.). I now updated to 0.7-alpha.81 and 2020.2eap, but my cpu usage is still high. Anything I can do about it? My fan is constantly spinning up and it is not good for the electricity bill ;)
Does the alpha release actually work in 2020.1? If I remember correctly I raised the Since build because there were crashes from using functionality that did not yet exist in 2020.1 (though that was in IntelliJ).
I built it from the latest commit on the master branch and it seemed to work in 2020.1, yes.
Thanks for reporting the exception by the way, it is caused by a recent change I made for #1512, and could happen any time you press enter.
Ah yes, I now see the pattern!
Can you try the following build, which has the EvinceInverseSearchListener disabled? If the issue is still there, then it was not the same issue as in alpha.79, and I have no idea what it could be. If the issue disappears, then I need to figure out how it is possible that I don't see high cpu usage myself but you do.
TeXiFy-IDEA-0.7-alpha.81-vhjoren.zip
I built it from the latest commit on the master branch
That explains it, because the code for 2020.2 is still in #1454 I could publish alpha releases for 2020.1 as well, and we can see whether there are users for those.
Can you try the following build, which has the EvinceInverseSearchListener disabled? If the issue is still there, then it was not the same issue as in alpha.79, and I have no idea what it could be. If the issue disappears, then I need to figure out how it is possible that I don't see high cpu usage myself but you do.
The cpu usage remains high, also for this special build. The error disappeard, though :D
For a moment, I thought it might be related to the large file that I am working on: splitting it up in smaller parts seemed to make the cpu usage decrease. However, I now opened up a smaller project and the problem also occurs there.
cpu usage hovers at around 40% while scrolling through my documents and it goes up to 80-90% while typing.
Hm, that's not good. Since it's not the same issue (which simply locked 1 cpu for 100% in a busy loop), can you perhaps run a profiler on that TeXiFy version, and upload the snapshot here? See https://github.com/Hannah-Sten/TeXiFy-IDEA/wiki/Contributing-to-TeXiFy#debugging-performance-issues (I'm assuming you don't have continuous compilation selected in settings, in which case this would be sort of expected behaviour).
I am trying to, but github complains that it does not support the .nps file type.
In my case, all four threads go the the percentages I mentioned.
I think part of the issue might be in the code analysis. When I just type a space somewhere in my document, the 'inspections' progress bar from the code analysis starts reloading and it takes about 5 seconds before it is finished.
edit: I turned off all latex inspections, but to no avail...
I suppose you would need to zip the nps file. I just took a look as well, and it looks like the fileset cache is broken again, which would explain the cpu usage. I still need to confirm that though, and it would not explain CPU usage when not interacting with Pycharm. I just was distracted by other continuous high (20%) CPU usage, but it came from a bug in the markdown plugin.
[Edit] Fileset cache does not seem broken on master at least, not sure why I saw that in the profiler. Also I do have some slowness in typing in my main IntelliJ, but not when I run TeXiFy from master.
This is what I get while running the special build you made. I realize this is a bit like finding a needle in a haystack.
I am getting the feeling that I am wasting your time: I disabled TeXiFy and the cpu usage while scrolling is still high! This problem seemd to have started after updating TeXiFy, but perhaps I changed other things concurrently.
Thanks for the snapshot! Indeed, I see no unusually large sampled times from TeXiFy. This haystack is not so big, compared to the one for supporting update without restart.... If you are still using Pycharm 2020.1 I wouldn't expect it to be the same bug from the markdown plugin (which is bundled), especially if you don't have JCEF previews open. Please let me know if you find the cause (even if it's not TeXiFy).
No problem, I'm glad you thought of disabling TeXiFy as well. You didn't waste any time, the markdown bug did though :)
Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version
Pycharm 2020.1
Operating System
Ubuntu 18
TeXiFy IDEA version
0.7-alpha.79 (compiled myself to be able to install in pycharm 2020.1 instead of 2020.2eap
Description
My CPU usage is around 85% from the moment I start working on a document and it remains that high. I think this is related to the bug. I am not working on an enumaration when this occurs. Is the plugin incompatible with pycharm 2020.1, causing the problem?
Stacktrace