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.

Editor sluggish on document diagnostics update

See original GitHub issue

Issue Report Checklist

  • [x ] Searched the issues page for similar reports
  • [ x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • [ x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)

Problem Description

On mac (macOS 10.15.5, in this case), the editor in spyder seems to be laggy and slow. Simple tests are fast typing - sometimes it takes seconds to fill all characters. Scrolling is also slow - the editor keeps on rolling for seconds after the wheel on the mouse stops until the “buffer” is worked on… Autocomplete needs up to seconds to react. However, it does not seem to be autocorrect related since disable alls features in this class do not change anything - neither does styles like vertical lines… All tests are on a 4k screen, different scalings tested. The UI seems to be responsive anyway.

What steps reproduce the problem?

  1. Start spyder on macOS and start typing in the editor (!not the console - that works fast!)

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

  • Spyder version: 4.1.3
  • Python version: 3.7.7
  • Qt version: 5.12.8
  • PyQt version: 5.12.3
  • Operating System name/version: macOS10.15.5 (Darwin 19.4.0)

Dependencies


# Mandatory:
applaunchservices >=0.1.7      :  0.2.1 (OK)
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.4.1 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.15.0 (OK)
jedi =0.15.2                   :  0.15.2 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  1.0.0 (OK)
parso =0.5.2                   :  0.5.2 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=0.25                  :  2.5.3 (OK)
pyls >=0.31.9;<0.32.0          :  0.31.10 (OK)
qdarkstyle >=2.8               :  2.8.1 (OK)
qtawesome >=0.5.7              :  0.7.2 (OK)
qtconsole >=4.6.0              :  4.7.4 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
sphinx >=0.6.6                 :  3.1.0 (OK)
spyder_kernels >=1.9.1;<1.10.0 :  1.9.1 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  19.0.1 (OK)

# Optional:
cython >=0.21                  :  None (OK)
matplotlib >=2.0.0             :  3.2.1 (OK)
numpy >=1.7                    :  1.18.5 (OK)
pandas >=0.13.1                :  1.0.4 (OK)
scipy >=0.17.0                 :  1.4.1 (OK)
sympy >=0.7.3                  :  None (OK)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:35 (23 by maintainers)

github_iconTop GitHub Comments

2reactions
colinwwcommented, Jul 7, 2020

@dalthviz yes I can confirm that disabling just this option (leaving all the other features e.g. code completion, folding, etc) makes a huge improvement in usability.

One thing to note: a big source of slowdown comes with comment blocks """... """ The reason is that I enabled the “automatically insert closing quotes” which is usually quite helpful. But for docstrings, because 3 quotes are needed, there’s always a bit of deleting and re-entering to get the requisite 6 total quotes.

During that time, the editor seems to want to re-lint the whole file, so for example if I have 1k lines of text and I edit a docstring at the top of the file, that moment when I have the un-terminated block comment creates this hiccup where suddenly the whole file is a string, and then it’s not, etc.

Anyway thank you @mrclary and @dalthviz for all the support!

2reactions
colinwwcommented, Jul 7, 2020

I ran the earlier suggestion of profiling spyder within spyder. The testcase is very simple. I simply browsed the source code of CppHeaderParser : https://pypi.org/project/CppHeaderParser/ The file is lib/python3.7/site-packages/CppHeaderParser/CppHeaderParser.py.

This is a nice long file which essentially kills the spyder editor. I’d estimate seeing the spinning pinwheel 80% of the time while browsing the file, even just scrolling. Pressing “Enter” e.g. a newline, or removing a quotation on a string, etc. All very slow.

spyder_profile_cpp_header_parser.Result.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

System VERY SLOW. Did Diagnostics Performance Check ...
Hello everyone. I have watched my computer get slower and slower each day this month. I did disk cleanup, defrag, and checked for...
Read more >
Rstudio very slow when editing large code - Stack Overflow
is being edited, even a click on the text or unfolding takes about 4 seconds to respond. I've tried to disable diagnostics, but...
Read more >
2022.1 editor lagging and scroll performance slowing down ...
It scrolls smoothly when I open projects for few minutes, then it start to slow down and in an hour it is unusable...
Read more >
neovim 0.5 lsp diagnostic lag - Reddit
I'm using the latest master build of neovim with the builtin lsp and diagnostics. I'm getting this weird lag when I leave INSERT...
Read more >
Slow or choppy performance when editing video
Slow or choppy performance when editing video ... Get updates Download ... merge the edited files from the separate projects into a new...
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