Skip to content

Intellisense slow on 5k files #274

@TheColorRed

Description

@TheColorRed

I like the new auto completion tool and, I have a Laravel project that parses the files like so:

All 5568 PHP files parsed in 253 seconds. 178 MiB allocated.

When I type $someVar-> it takes about 2 seconds until the suggestions show up.

Activity

felixfbecker

felixfbecker commented on Feb 3, 2017

@felixfbecker
Owner

Hmm, aggregating the completion results should be O(n).
This would be interesting to profile.

TheColorRed

TheColorRed commented on Feb 3, 2017

@TheColorRed
Author

Not sure if you saw this in the release notes of VSCode 1.9, but there is a php parser they are working on

https://github.com/Microsoft/tolerant-php-parser

Might be helpful in some way...

felixfbecker

felixfbecker commented on Feb 3, 2017

@felixfbecker
Owner

Yes, I am aware of it 🙂

autoferrit

autoferrit commented on Jun 9, 2017

@autoferrit

I have a similar issue on a Code igniter project. The autocompletion for class methods doesnt even pop up until I hit ctrl + space, then takes a few seconds. If i delete the -> and do it again, same thing. it doesnt cache the results either. but that is probably a different issue?

jens1o

jens1o commented on Jun 10, 2017

@jens1o
Contributor

@autoferrit afaik the results are not cached, but only the files where we get the results right. I think that's the bottleneck, yes.

binarious

binarious commented on Oct 27, 2017

@binarious

CTRL + Space takes about 12 seconds for me. I do have 10k PHP files:

All 10140 PHP files parsed in 16 seconds. 504 MiB allocated.

macOS: 10.13
3,7 GHz Quad-Core
12 GB RAM
PHP: 7.1.10
Extension: 1.5.2
Code: 1.17.2

bmax

bmax commented on Nov 11, 2017

@bmax
Contributor

Hi! @felixfbecker willing to work on this -- Do you have any suggestions on the best place to start? Profiling it with XDebug?

lndj

lndj commented on Jan 27, 2018

@lndj

Has anything help now?

binarious

binarious commented on Jan 27, 2018

@binarious

I had to switch to PHP Intelephense.

lndj

lndj commented on Jan 30, 2018

@lndj

@binarious is it faster?

binarious

binarious commented on Jan 30, 2018

@binarious

@lndj It just works for me. Suggestions and method signatures show up instantly on very large projects.

madbbb

madbbb commented on Mar 16, 2018

@madbbb

@TheColorRed
Have you disabled VSCode built-in suggestions? Try to set "php.suggest.basic" to false in settings.

18 remaining items

jens1o

jens1o commented on Nov 6, 2018

@jens1o
Contributor

Thanks for the ping. Forgot to push. This is the current thing I've on. However, some tests are still failing currently. jens1o@f45c44f

felixfbecker

felixfbecker commented on Nov 6, 2018

@felixfbecker
Owner

Feel free to open a work-in-progress PR

MichaelBelgium

MichaelBelgium commented on Nov 6, 2018

@MichaelBelgium
Contributor

[Info - 9:39:44 PM] All 5316 PHP files parsed in 8 seconds. 394 MiB allocated.

It's getting parsed for me in less seconds but yeah doesn't change the fact it's slow in auto completing. Can't wait for a fix!

felixfbecker

felixfbecker commented on Nov 6, 2018

@felixfbecker
Owner

@MichaelBelgium if you can't wait, help out :)

MichaelBelgium

MichaelBelgium commented on Nov 6, 2018

@MichaelBelgium
Contributor

@MichaelBelgium if you can't wait, help out :)

Is this what needs to be done?

felixfbecker

felixfbecker commented on Nov 6, 2018

@felixfbecker
Owner

Yes

jens1o

jens1o commented on Nov 7, 2018

@jens1o
Contributor

Okay, thanks for taking your time. :)

MichaelBelgium

MichaelBelgium commented on Nov 7, 2018

@MichaelBelgium
Contributor

Okay, thanks for taking your time. :)

Anytime :) if it's only a simple merge ... surprised nobody did it before me.

added a commit that references this issue on Nov 11, 2018
24388bc
felixfbecker

felixfbecker commented on Nov 11, 2018

@felixfbecker
Owner

🎉 This issue has been resolved in version 5.4.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

felixfbecker

felixfbecker commented on Nov 11, 2018

@felixfbecker
Owner
midN

midN commented on Jun 7, 2019

@midN

I had to switch to PHP Intelephense.

Same, the issue is still happening, had to switch, now it's instant..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Ciantic@autoferrit@bmax@binarious@koloda

      Issue actions

        Intellisense slow on 5k files · Issue #274 · felixfbecker/php-language-server