Spyder: New way to update folding regions (PR #13783) freezes Spyder

Created on 25 Nov 2020  路  10Comments  路  Source: spyder-ide/spyder

Issue Report Checklist

  • [ ] Searched the issues page for similar reports
  • [ ] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • [ ] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • [ ] Could not reproduce inside jupyter qtconsole (if console-related)
  • [ ] Tried basic troubleshooting (if a bug/error)

    • [ ] Restarted Spyder

    • [ ] Reset preferences with spyder --reset

    • [ ] Reinstalled the latest version of Anaconda

    • [ ] Tried the other applicable steps from the Troubleshooting Guide

  • [ ] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

While using the editor, Spyder freeses for ~30s very often. I saw with the frame explorer that it was blocked in the new code intoduced by PR #13783. After reverting the merge, spyder works again.

What steps reproduce the problem?



    1. 2.
  1. 3.

What is the expected output? What do you see instead?

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

  • Spyder version:
  • Python version:
  • Qt version:
  • PyQt version:
  • Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE
Editor Bug

Most helpful comment

Ok, I will test it while I work. I can report back tomorrow. Thanks for working on this.

All 10 comments

Hi @impact27 thanks for the feedback :+1: Not sure if @andfoy or @ccordoba12 are aware of the performance issue but pinging them here just in case

Thanks @impact27 for reporting. How long is the file that shows the freezes?

I'm experiencing the same thing too. It occurs on files that are not very long, like 500 lines maybe.

@andfoy, could you reproduce this one?

It seems that textdistance is causing delays here:

imagen

It seems that the lag was due to the usage of Jaro-Wrinkler distance, after replacing it with a normalized Jaccard index, the performance did improve:

spyder_prof

@impact27 @jnsebgosselin could you please check if https://github.com/spyder-ide/spyder/pull/14315 improves the editor performance?

Ok, I will test it while I work. I can report back tomorrow. Thanks for working on this.

I confirm that PR #14315 fixes the editor performance for me.

Great! Thanks @jnsebgosselin for the confirmation!

Was this page helpful?
0 / 5 - 0 ratings