Comments (6)
@xiaohuilam swoole looks nice, but I don't want to require users to compile the extension themselves.
@trahibidadido I released 0.4.0, there are some performance-related improvements, your case should be fixed.
from tenkawa-php-language-server.
Do you mean the time to show the autocompletion dropdown? vscode seems to wait for responses from all servers before displaying anything, and tenkawa's semantic completion is pretty slow (especially in big projects with a lot of dependencies). I'm trying to come up with ideas to improve it, but this is somewhat difficult problem, sorry. One thing to make sure is if indexing has finished (the popup "Indexing files..." disappeared).
from tenkawa-php-language-server.
This issue, i think, is about the project's protocol structures.
PHP is a synchronized language, it means when a request
(sort of, maybe not correctly at all) is under processing, in this thread, it can not accept next request same time.
I make this conjecture because i tried this extension, when i find a method references, it might takes little second, and the same time i try to go to definition, it will be frozen until previous work is done.
To solve this problem, seems need package owner to implement coroutine functions, or just fork a new thread when a request received (cpu might overweight?).
from tenkawa-php-language-server.
React\EventLoop is a dependency, which suggests that tenkawa does run asynchronously. (I'm not entirely sure though, as I haven't looked at the source code in depth).
from tenkawa-php-language-server.
Yes the server runs on coroutines (react & recoil) but most of the task are cpu-bound and often hard to split because they call synchronous code (like phpstan). Also this is the reason that implementing cancellations would not be very useful right now.
Starting several processes would be complicated as they'd need to share a lot of state (open documents, index, caches etc.)
from tenkawa-php-language-server.
@tsufeki
strongly advice to explore with https://github.com/swoole/swoole-src, it says provides a sync to async quick magic calls Swoole\Runtime::enableCoroutine()
, i'm sure asynchronization works fine with pdo/curl because i have private project is powered by it, but i am not sure if it work with file r/w io...
--
but i have a bad sight for that because the disk i/o wait is not able to resolve by just simple cpu task switching according to my thought. my test shows it works (video demo) with code gist:
from tenkawa-php-language-server.
Related Issues (14)
- slow indexing
- No indexing with LanguageClient-neovim HOT 5
- annotation supports not complete HOT 4
- Goto method definition bug when mixed type HOT 3
- Allow to change phpstan rule level HOT 6
- Auto import of open bracket on complete HOT 1
- Possible to add additional stubs or build project-specific index? HOT 3
- Problems in loaded and import HOT 1
- Make server as TCP Server
- VSCode: I cannot run the server because "I don't have the sqlite ext enabled" but I have it HOT 10
- Refactoring Issues on windows HOT 1
- Go to definition it doesn't update metadata HOT 5
- PHP 7.4 Exception - ReflextionType::__toString() is deprecated HOT 3
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 tenkawa-php-language-server.