You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
A few days ago, I submitted issue #946. I'm glad to say that since latest updates, this issue is gone. A new issue appeared to take it's place, though…
Everytime I do the slightest change to any python file in the project (e.g it could be simply adding a space somewhere), the whole project is re-analyzed from scratch and I see the "analyzing in background" message flashing.
Now, the analysis is super quick, a few seconds vs. whole minutes a few weeks ago but since I'm constantly editing files, the whole project is analyzed over and over endlessly, and cpu usage is of course off the charts.
I could reproduce this issue with several different projects.
I'm running into an issue that could be related to this so rather than opening a new issue going to pile on this one. Mine rather than being performance related is about syntax correctness.
Making a change triggers an analysis in the background and sometimes the syntax analysis will say that there are syntax errors that will linger until the analysis is complete, which in large projects can take a little while.
One example I was able to reproduce pretty constantly was if I wrote a text that the syntax analysis would consider as invalid, and delete it after the error mark would be set, the warning of an invalid variable would stay there if the code was deleted. It goes away as the triggered analysis finishes but sometimes when I would write a somewhat large piece of code the syntax errors would highlight stuff that had already been taken care of, or mid writing words that no longer exists.
I wonder if a possible solution to this would be limiting the scope of these rapid fire analysis that happen on every change to the single current document, and doing a large scale analysis either based on time or when the document gets saved. Don't know if either of those solutions are valid.
Thibault J. (@thibault) - Reloading modules is triggered when analysis engine thinks something has change in libraries. Jake Bailey (@jakebailey) can comment more here - generally we take what Python reports as search paths that set from the root of the workspace in order to determine what is library and what is user code. I guess we miss something and your code is recognized as library so saving file triggers the reload.
This is just a general note, but the VSC extension recently updated and included some rewritten LS startup code; this should make the search paths behave much better (especially if you've used PYTHONPATH/extraPaths). Adding ./src or similar to one of those should now operate properly. Given this issue was originally a few weeks ago, it might be fixed if you're using the stable extension.
Activity
CMLL commentedon Apr 19, 2019
I'm running into an issue that could be related to this so rather than opening a new issue going to pile on this one. Mine rather than being performance related is about syntax correctness.
Making a change triggers an analysis in the background and sometimes the syntax analysis will say that there are syntax errors that will linger until the analysis is complete, which in large projects can take a little while.
One example I was able to reproduce pretty constantly was if I wrote a text that the syntax analysis would consider as invalid, and delete it after the error mark would be set, the warning of an invalid variable would stay there if the code was deleted. It goes away as the triggered analysis finishes but sometimes when I would write a somewhat large piece of code the syntax errors would highlight stuff that had already been taken care of, or mid writing words that no longer exists.
I wonder if a possible solution to this would be limiting the scope of these rapid fire analysis that happen on every change to the single current document, and doing a large scale analysis either based on time or when the document gets saved. Don't know if either of those solutions are valid.
MikhailArkhipov commentedon Apr 29, 2019
Thibault J. (@thibault) -
Reloading modulesis triggered when analysis engine thinks something has change in libraries. Jake Bailey (@jakebailey) can comment more here - generally we take what Python reports as search paths that set from the root of the workspace in order to determine what is library and what is user code. I guess we miss something and your code is recognized as library so saving file triggers the reload.Carlos Llamacho (@CMLL) - this sounds like a different issue related to cancellation of running analysis after changes. Alexander Sher (@AlexanderSher) may be interested.
jakebailey commentedon Apr 29, 2019
This is just a general note, but the VSC extension recently updated and included some rewritten LS startup code; this should make the search paths behave much better (especially if you've used PYTHONPATH/extraPaths). Adding
./srcor similar to one of those should now operate properly. Given this issue was originally a few weeks ago, it might be fixed if you're using the stable extension.MikhailArkhipov commentedon May 14, 2019
Folding into #1076