Comments (4)
It seems the linters, intellisense providers, etc all run in a synchronous and single threaded manner. I feel that this could prove to be quite slow with larger code bases (with linters, code definition, hover, etc all happening in very quick succession). Wouldn't it be better to run the linters in a separate thread or process, with callbacks?
from python-language-server.
I agree multi-threaded would be preferable, happy to look at PRs! Right now almost all the providers act only on a single file so performance issues from large repos tend to be limited to only a few cases (where jedi looks at the entire python path for symbols e.g. code completion / go to definition etc).
We can open an issue for multi-threading but until it's clear performance is an issue I likely won't have time to make the change.
from python-language-server.
So currently the linters/formatters and any other providers are declared at the top of the PythonLanguageServer class.
The idea behind this (although not implemented at the moment) is that the initializationOptions can be used to choose between different providers. Notice we already use multiple linters at the same time and could easily configure different formatters on initialisation.
In terms of linter / formatter config, again some of this could be passed in the initializationOptions
but we already support reading config from setup.cfg
, tox.ini
files etc. that are available in the workspace. Unfortunately this is currently done manually instead of relying on the tools' built-in config parsing meaning results may vary. An improvement here might be to shell out to pycodestyle / pyflakes / any other linter setting the working directory to the workspace root and then parsing stdout.
from python-language-server.
I'm going to close out this issue since its a bit generic and vague. I think there are a couple of issues up for configuration of providers and for performance. Feel free to open any other issues separately if not covered by those two. Thanks!
from python-language-server.
Related Issues (20)
- Warning: The engine "vscode" appears to be invalid. HOT 3
- Is this package being deprecated? HOT 4
- Lists are not merged but overriden HOT 1
- AttributeError: 'PosixPath' object has no attribute 'read_text' HOT 2
- Missing support for flake8 --extend-ignore HOT 4
- Unable to start the Python language server
- An issue on workspace/didChangeWorkspaceFolders event HOT 1
- Allow changing severity of flake8 messages HOT 1
- [question] Does python-language-server have a release version suitable for python 3.4? HOT 2
- error pip
- Enable "Discussions"
- Python language server breaks autocomplete on Python 3.11 HOT 4
- Is there a configuration option to enable jumping to `builtin` module stubs? HOT 1
- Crashes due to Pydantic Validation
- Crashes in VS Code due to Pydantic Validation Error HOT 2
- Why no new release after 2020? HOT 1
- Adding from-stdin = false to toml config causes pylint to hang
- How to implement custom completion items through pyi scripts? HOT 1
- Active Fork: python-lsp-server
- mypy cannot locate local packages
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 python-language-server.