Skip to content

Global symbol search #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sunverwerth opened this issue Sep 18, 2016 · 2 comments
Closed

Global symbol search #30

sunverwerth opened this issue Sep 18, 2016 · 2 comments
Labels

Comments

@sunverwerth
Copy link
Contributor

sunverwerth commented Sep 18, 2016

First off, great work! I am using your extension during daily development and it works very well.

A feature still missing is global symbol search. (ctrll+p, #)
I started working on a feature branch and it already does the job.

Parsing the whole php-language-server project takes about 10 seconds on my machine.
The php-cli process takes up about 180MB of ram with all symbol information parsed.

Changes made:

  • Added support for client:window/* commands
  • Added support for server:workspace/* commands
  • Refactored symbol database into own set of classes. (Was in Server/TextDocument before)
  • Disabled memory limit
  • ProtocolStreamReader was blocking the event loop, made non-blocking
  • Find all .php files on startup and start parsing one at a time with Loop/nextTick

To do:

  • Fix old tests
  • Add new tests
  • Reduce memory usage. Most of it is the AST, maybe we can throw it away after parsing,
  • Figure out solution for blocking STDIN. The current one is a hack. This is a windows limitation, see https://bugs.php.net/bug.php?id=34972

Please let me know what you think about it and if you want any changes made. I can then open a pull request.

@felixfbecker
Copy link
Owner

Wow, nice work! I really like the refactor into separate classes. I would encourage you to open the PR right because then I can make comments there (you can still add stuff to the branch)

@sunverwerth
Copy link
Contributor Author

Created the PR. #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants