Code style linting performance is extremely low
See original GitHub issueDescription
What steps will reproduce the problem?
Writing code will reproduce the problem. Code style linting will degrade the performance of the Editor by several magintudes. Especially in large class definitions with more than 1k LOC, the linting completely stops the editor for several seconds (usually around 10-15 seconds in a file with 3k LOC) each time a line is altered. Writing new lines makes the Editor hang for around 3 seconds, but typed symbols will still appear after some time.
Especially assert statements with isinstance() checks seem to break the performance.
Please add a warning to the “Enable code style linting” checkbox in settings -> “Completition and lintint -> Code style” as long as this is not resolved, since finding the root of the performance drops takes ages… Thanks!
EDIT: I didn’t know the button “report bug” in Spyder directly created an Issue… So if you think that creating an issue for this problem is too much, feel free to close it.
Versions
- Spyder version: 4.0.0rc1
- Python version: 3.7.5
- Qt version: 5.9.6
- PyQt5 version: 5.9.2
- Operating System: Windows 7
Dependencies
cloudpickle >=0.5.0 : 1.2.2 (OK)
pygments >=2.0 : 2.4.2 (OK)
qtconsole >=4.5.5 : 4.5.5 (OK)
nbconvert >=4.0 : 5.6.1 (OK)
sphinx >=0.6.6 : 2.2.1 (OK)
pylint >=0.25 : 2.4.3 (OK)
psutil >=0.3 : 5.6.3 (OK)
qtawesome >=0.5.7 : 0.6.0 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
zmq >=17 : 18.1.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
numpydoc >=0.6.0 : 0.9.1 (OK)
spyder_kernels >=1.7.0;<2.0.0: 1.7.0 (OK)
qdarkstyle >=2.7 : 2.7 (OK)
atomicwrites >=1.2.0 : 1.3.0 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
watchdog : None (OK)
keyring : None (OK)
pexpect >=4.4.0 : 4.7.0 (OK)
pympler : None (OK)
sympy >=0.7.3 : 1.4 (OK)
cython >=0.21 : 0.29.13 (OK)
IPython >=4.0 : 7.9.0 (OK)
matplotlib >=2.0.0 : 3.1.1 (OK)
pandas >=0.13.1 : 0.25.2 (OK)
numpy >=1.7 : 1.17.3 (OK)
scipy >=0.17.0 : 1.3.1 (OK)
pyls >=0.29.3;<0.30.0 : 0.29.3 (OK)
rtree >=0.8.3 : 0.8.3 (OK)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top GitHub Comments
Closing due to lack of response.
Thanks @dalthviz for your help here.
Ok, thanks a lot for the code sample!
@dalthviz, please take a look at this one.