Comments (15)
@MilkyHearts @wiredprairie I can't make any promises about stability, accuracy, etc., but if you go into your settings and put "python.jediEnabled": false
that will prompt you to restart VS Code and then it will download our experimental language server. It's written in C# and taken from our Python workload for Visual Studio, so it should be much faster.
We are also working on it regularly, so if you end up wanting to try newer bits later before we release a public preview, just go into the extension's directory and delete the Analysis
directory; the extension will download the latest bits when you restart VS Code again.
But as I said, this is not even public preview for a reason, so no promises about anything. 😁
from vscode-python.
@brettcannon OMG THANK YOU! the autocomplete is instant after setting jediEnabled to false im so happy.
from vscode-python.
In the new year we're hoping to start looking into our intellisense performance and quality so we can begin to address the issues you and others are running into with it.
from vscode-python.
[ @MilkyHearts I edited your ✉️ ⬆️ to come off as more 😃 and less 😠 ]
from vscode-python.
Jedi is unfortunately slow. I just confirmed that with a simple test.
import jedi
with open('example.py', 'r') as example:
e=example.read()
script = jedi.Script(e)
completions = script.completions() # <<< WAIT
This may not be an adequate comparison or usage, but using the code above, it takes less than 5 seconds to build the list of completions
.
We'd definitely want Intellisense. The classes wouldn't be usable without Intellisense.
One issue is that it the penalty for extracting the completion data from a Python file appears to be each time Intellisense is requested, rather than being cached.
However, I'm not sure if users would accept a 20 second delay, even once per VS code launch for a file. (And a 5 second delay if that's the fastest it could be due to Jedi performance probably isn't acceptable either more than once a session.)
Ideally, the Jedi results would be cached until they've become stale or invalidated. As the files I'm talking about are generated, and very infrequently changing, a one time Jedi-to-cache file result would be a very effective way of reducing the time taken by further usage of Intellisense. Further, in our case, it would be great if the cache files could be deployed to a cache directory or as side-car files so that we'd Jedi-compile them once per Python file generation and then no user's VS Code instance would need to locally process the file, ever.
If the results were to be cached, especially for larger Python files, I would expect many Python extension users in VS Code would benefit.
from vscode-python.
This may be improved by fix for #152 (no longer immediately loading method docs, just names)
from vscode-python.
Unfortunately 40,000 lines of Python code is simply a large file to process. We use Jedi for our intellisense and it seems to not be handling a file of that magnitude that well. I'm assuming you still want the intellisense, just faster? Or do you want to just turn it off to avoid the penalty?
Otherwise we have discussed trying to share the intellisense engine between us and PTVS (would probably be a new one, not the one it currently has), but it would require downloading .NET and no concrete plans beyond "it's a possiblity" have been had yet.
from vscode-python.
@brettcannon -- any thoughts about this issue?
from vscode-python.
@wiredprairie - is it better in 0.9?
from vscode-python.
@MikhailArkhipov - unfortunately, it still takes 20+ seconds.
from vscode-python.
@wiredprairie would it be possible to upload a test file for us to benchmark against?
(BTW we are upgrading Jedi to 0.12.0; it probably won't resolve this issue but you never know 😉 ).
from vscode-python.
@brettcannon This is still a good example.
from vscode-python.
@wiredprairie Oops, sorry for not noticing the hyperlink in the initial message!
from vscode-python.
Its been almost a year and IntelliSense is still so slow...
This is really holding me back from using VSCode.
from vscode-python.
Closing as this is an upstream issue which we don't have direct control or influence over.
from vscode-python.
Related Issues (20)
- .env file not parsed properly
- testing tab is not showing all tests collected HOT 2
- Pytest discover on 3.9 does not find tests HOT 3
- Create setting for Python execution to be on Native REPL or Terminal HOT 1
- test pls ignore again
- test again pls ignore
- test ignore
- Native Locator does not return all windows store pythons
- Git Bash starts in the wrong folder HOT 2
- Decoding unicode string fails while running unit tests.
- PATH for selected Venv not used when pytest test run via Run Test
- F8 does not result in line being run HOT 2
- Test discovery errors out when navigating to the test panel (pytest) HOT 2
- [ms-python.python-2024.4.1 python 3.8.10] Error while creating virtual environment. HOT 4
- Allow users to reopen native REPL after closing
- Global python locators using native locator
- Test Plan Item: Native Locator for global environments
- Test Plan Item: Python Native REPL
- Native locator does not find all registry pythons HOT 1
- creating a file for python but it shows c++
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-python.