question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Code style linting performance is extremely low

See original GitHub issue

Description

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:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Nov 17, 2019

Closing due to lack of response.

Thanks @dalthviz for your help here.

1reaction
ccordoba12commented, Nov 8, 2019

Ok, thanks a lot for the code sample!

@dalthviz, please take a look at this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint-plugin-prettier is very slow · Issue #304 - GitHub
I'm not accustomed with prettier cli's API so I don't know how to trigger the Timing=1 to compare the results, neither could I...
Read more >
Lint Code: What Is Linting + When To Use Lint Tools | Perforce
Linting is the process of checking code for programmatic and stylistic errors. Learn how to easily use lint programming and lint tools (also ......
Read more >
7 drawbacks of linting tools - Codacy | Blog Best Practices
7 drawbacks of linting tools ... Linting tools (also known as linters or static analyzers) help automate the code review process. They perform...
Read more >
Strict Linting - pseudorandom
Linting is a set of metrics that are statically analyzed against the code. This static analysis can inform the user about known bad...
Read more >
Linting Python in Visual Studio Code
Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found