简体   繁体   English

vscode intellisense使用PyQt4太慢

[英]vscode intellisense too slow working with PyQt4

Intellisense suggestions that pop-up while you write in visual studio code with python extension take toooo much time (like 20 seconds) to appear if you are using PyQt4 classes. 如果您使用的是PyQt4类,则在使用python扩展名在Visual Studio代码中编写代码时弹出的Intellisense建议会花费太多时间(例如20秒)。 I tried with different files, inside and outside a project, same results. 我尝试了在项目内部和外部使用不同的文件,获得了相同的结果。 Even in a 40 lines .py that imports from PyQt4 import QtGui and has a simple class that inherits from QtGui.QTableWidget suggestions take forever, and it's even worse if you hit ctrl+space, it wont load at all. 即使在from PyQt4 import QtGui的40行.py中from PyQt4 import QtGui并具有一个继承自QtGui.QTableWidget建议的简单类,它会永远QtGui.QTableWidget建议,而且如果您按ctrl + space甚至更糟,则根本不会加载。

Commenting the import, and deleting the inheritance from PyQt4 classes, makes Intellisense work instantaneously again. 注释导入,并删除PyQt4类的继承,使Intellisense再次立即工作。

I wasn't sure if this justifies an issue in https://github.com/Microsoft/vscode-python 我不确定这是否可以解决https://github.com/Microsoft/vscode-python中的问题

maybe I'm doing something wrong? 也许我做错了什么?

for completion, here are my user settings: 为了完成,这是我的用户设置:

{
    "python.linting.enabled": true,
    "editor.formatOnSave": true,
    "python.linting.pylintArgs": [
        "--disable=R,C",
        "--extension-pkg-whitelist=PyQt4"
    ],
    "git.confirmSync": false,
    "git.autofetch": true,
    "csv-preview.separator": ";",
    "workbench.startupEditor": "newUntitledFile",
    "python.formatting.autopep8Args": [
        "--max-line-length=100"
    ]
}

update: Having the same project, Intellisense runs much faster in VS code under debian. 更新:在同一个项目中,Intellisense在debian下的VS代码中运行得更快。 (4-5 secs instead of 20+) (4-5秒,而不是20+)

Jedi is simply not fast when it comes to PyQt. 在涉及PyQt方面,绝地并不简单。 It's a known issue and we are working on bringing the analysis engine from Visual Studio over to VS Code in the near future (following our blog at https://aka.ms/pythonblog for release announcements to know when it's available). 这是一个已知问题,我们正在努力在不久的将来将分析引擎从Visual Studio移植到VS Code(在我们位于https://aka.ms/pythonblog的博客中以了解发布公告,以了解何时可用)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM