Skip to content
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

Symbol navigation is slow in large project with python venv #1728

Closed
zjjott opened this issue May 23, 2018 · 7 comments
Closed

Symbol navigation is slow in large project with python venv #1728

zjjott opened this issue May 23, 2018 · 7 comments
Labels
feature-request Request for new features or functionality

Comments

@zjjott
Copy link

zjjott commented May 23, 2018

Environment data

  • VS Code version: 1.23.1
  • Extension version (available under the Extensions sidebar): 2018.4.0
  • OS and version: MacOS 10.13.4
  • Python version (& distribution if applicable, e.g. Anaconda): Python3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: tensorflow

Actual behavior

Symbol navigation is slow,about 5 seconds after open symbol navigation every time
large gif here:5.7M ,here is a compress gif,it's speed up
qq20180523-152838

Expected behavior

faster as it in small project

Steps to reproduce:

  1. install some package such as tensorflow in venv
  2. use Symbol navigation

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

[2018-05-23 15:18:15.484] [exthost2] [info] ExtensionService#_doActivateExtension vscode.python {"startup":false,"activationEvent":"onLanguage:python"}
[2018-05-23 15:18:15.484] [exthost2] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/python/out/pythonMain
[2018-05-23 15:18:15.486] [exthost2] [info] ExtensionService#_doActivateExtension ms-python.python {"startup":false,"activationEvent":"onLanguage:python"}
[2018-05-23 15:18:15.486] [exthost2] [info] ExtensionService#loadCommonJSModule /Users/zhutou/.vscode/extensions/ms-python.python-2018.4.0/out/client/extension

How can I profile this behavior?I have enable vscode profile but there is nothing about this extensions

@brettcannon brettcannon changed the title Symbol navigation is slow in large project with python vent Symbol navigation is slow in large project with python venv May 24, 2018
@zjjott
Copy link
Author

zjjott commented May 28, 2018

@brettcannon I have add profile in completion.py,here is result:
https://gist.github.com/zjjott/90edffc72d4aa06972150d79d86618ba

@brettcannon brettcannon self-assigned this May 29, 2018
@brettcannon
Copy link
Member

So this is on initial load only. What kind of performance would you expect? Without constantly scanning a file for it to be preloaded, there will always be a cost.

@brettcannon
Copy link
Member

Regardless, this would require Jedi to become faster.

@brettcannon brettcannon removed their assignment May 29, 2018
@zjjott
Copy link
Author

zjjott commented May 30, 2018

@brettcannon but actually,everytime the same file open the navigation,it's slow
I don't know,why a file with less than 100 lines cost so long time.
as I know ,Symbol navigation should only load once?

@zjjott
Copy link
Author

zjjott commented May 30, 2018

In my memory, this feature in history is faster than now

@brettcannon
Copy link
Member

@zjjott it might be a performance regression in Jedi from our 0.12.0 upgrade we did recently. But once again, it would be an issue in Jedi and they would need to make the changes to speed it up.

@brettcannon
Copy link
Member

Closing as this is an upstream issue which we don't have direct control or influence over.

@ghost ghost removed the needs upstream fix label Jul 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants