-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up linting #444
Comments
I've created another issue to track the bug, #447 |
Please could you give us an idea of how long this is? |
About 10 seconds |
@MFairley - Is time the same if you run pylint from command line? We can probably improve this a bit by keeping pylint up rather than running it every time, but generally speed is limited by what it takes pylint to get through the file. |
time pylint main.py
real 0m5.686s
user 0m5.102s
sys 0m0.203s
I think ~5 seconds feels slow if that is how long it takes to update the pylint messages each time in VSCode.
On Feb 1, 2018, at 11:48 AM, Mikhail Arkhipov <[email protected]<mailto:[email protected]>> wrote:
Is time the same if you run pylint from command line? We can probably improve this a bit by keeping pylint up rather than running it every time, but generally speed is limited by what it takes pylint to get through the file.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#444 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AELBAaTmPhrCPaohVVWouBAh7-AHQcTUks5tQhUGgaJpZM4REco7>.
|
We can save some time on not launching pylint every time, but I don't expect the process to be lightning fast. Pylint needs to fully parse all related files, build ASTs and analyze their structure. All that is done in Python. Depending on the code size it may take a while. Ex full C# code analysis in VS C# solution (say, using Resharper) takes quite a while (~10 seconds+). There are different approaches such as building own AST in a compiled language with incremental updates (PyCharm comes to mind), but this is a large endeavor. |
I don't know too much about the internals it, But how py-charm is doing linting on the real time ? If possible why can't we use the same way they are using ? Just asking . |
@jeyanthimuthuram as @MikhailArkhipov said, we could do what PyCharm does but it requires re-implementing Pylint. So it's doable, but not an easy thing to do. |
@brettcannon I totally agree, but I feels like it should be one of the very key features of this plugin ( as python is now natively supported by vscode ) But I do toally agree there is a lot of work need to be put behind this. @DonJayamanne @MikhailArkhipov do we have any roadmap on this ? |
@jeyanthimuthuram the roadmap is "we're working on it" 😉 , otherwise we don't announce anything more on purpose as these things have a tendency to slip since we're talking about such large, critical aspects of the extension. |
@brettcannon Thanks for the response, I know you guys can make it work 👍 Looking forward for this feature . |
@jeyanthimuthuram - PyCharm is not using Jedi. JetBrains are professionals in languages :-) and build their own parsers. Same with Python Tools in VS or R Tools in VS that we own. Both have async parsing and code analysis as you type on unsaved files as do C#, C++ etc. We have code (but its in C#) and experience, but it takes time :-) |
New Python Analysis engine does syntax check as you type. Closing since the engine was integrated with #1231 |
Environment data
VS Code version: 1.19.0 (1.19.0)
Python Extension version: 0.9.0
Python Version: Anaconda 2.7.14
OS and version: mac OS 10.13.2
Actual behavior
Updates to Pylint messages are very slow even after saving, it takes several seconds for messages to change. For example, if a variable is undefined and then defined, the linter will take several seconds to update it's undefined variable message.
Expected behavior
Messages should update instantly when the linter is run.
Steps to reproduce:
Logs
Output from
Python
output panelOutput from
Console window
(Help->Developer Tools menu)The text was updated successfully, but these errors were encountered: