Closed eimajenthat closed 6 years ago
I'm just doing the same thing, and found that InteliSense (non Crane) is just awfully slow on big projects. My setup is Intelephense, Intellisense Crane and leaving vs code suggest on, cause both extensions miss somethings. Hope it helps
So you're using both Crane and Intelephense?
Hi,
Crane was the first third party php extension on vscode, then few month later it was followed by felixfbecker's version.
The same question was answered at that time here : https://github.com/HvyIndustries/crane/issues/141
The main difference between crane & felixfbecker.php-intellisense is that crane is using a PHP parser written in JS instead using a parser based on PHP. The main reason was to provide a parser that parses files without having to install PHP or handle the right PHP version.
Additionally, a parser requires a high number of string manipulations, function calls, files IO, and consumes memory, and on each part PHP is slower than NodeJS. That's the main reason why php-intellisense does not scales well on larger projects.
bmewburn.vscode-intelephense-client is another implementation based on TypeScript so in principle more efficient than php-intellisense. Here the parsers and their differences :
Microsoft has also provided a parser but again based on PHP (with same performance bottlenecks), and it's almost the same as bmewburn/php7parser :
@eimajenthat Yes, I'm using both and leaving VS Code suggestions activated too. They work well together even if there are some cases when I get duplicate suggestions
Thanks for the information everyone! I'm going to mark this closed as I've received excellent and thorough answers. But if anyone else wants to comment, feel free. Thanks again!
I have been using VS Code for PHP development for some time now, and have been using Felix Becker's PHP IntelliSense extension most of that time. Recently, I noticed that there are actually 3 fairly popular VS Code extensions for PHP intellisense (along with some less popular ones I've bypassed for expediency):
This raises several questions for me: