Author Topic: Slooooowwwww typing with python files  (Read 5751 times)

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Slooooowwwww typing with python files
« on: August 23, 2012, 01:30:45 PM »
Whenever I have a few python files open, SE response is so slow that I'm about 10 characters ahead of what is showing on my screen within a few seconds. C/C++ doesn't have the same issues. What settings might I disable to get SE to allow me to code quick again?

Dennis

  • Senior Community Member
  • Posts: 3998
  • Hero Points: 521
Re: Slooooowwwww typing with python files
« Reply #1 on: August 23, 2012, 02:48:41 PM »
Profile (Slick-C profiling on the Macros menu) and post some results and I can give you suggestions.

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Slooooowwwww typing with python files
« Reply #2 on: August 23, 2012, 03:15:11 PM »
Opened up 3 python files, started typing, turned on profiler and kept typing to see that it was really slow. Turned off profiler and saved the file.

Dennis

  • Senior Community Member
  • Posts: 3998
  • Hero Points: 521
Re: Slooooowwwww typing with python files
« Reply #3 on: August 23, 2012, 04:27:40 PM »
The profiling data shows almost nothing going on.

What platform are you on?
What encoding are the Python files?
Are you using a proportional font for Unicode files?
What font are you using (I use Consolas and don't see these problems)?

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Slooooowwwww typing with python files
« Reply #4 on: August 23, 2012, 05:01:39 PM »
I'm running on MAC O/SX Mountain Lion (10.8)
The files live on a Linux server so are Unix encoded (LF)
I'm using courier 12pt font for SCBS/DBCS Source and Unicode source

It almost seems to be spending time parsing the code because it seems to be worse the more python files I have open. I haven't spent the time to figure out an exact pattern though. I'll try to figure out if there is a pattern to it but it seems better if I only have one python file open than if I have more.

Dennis

  • Senior Community Member
  • Posts: 3998
  • Hero Points: 521
Re: Slooooowwwww typing with python files
« Reply #5 on: August 23, 2012, 05:05:58 PM »
If typing were slowed down by parsing, it would show up in the profiling data.

Are you at liberty to share these Python files (or send them into support, so we can try to reproduce the problem).

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: Slooooowwwww typing with python files
« Reply #6 on: August 24, 2012, 01:25:22 PM »
I can get a similar (sounding) slow typing issue on C/C++ on the Mac V17 builds that does not happen on PC.

If i type fast, characters catchup very slowly (same config on both platforms).  It's not an issue on V16 for Mac.  I have seen the mac NOT do this slowly but that's rather rare.

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
Re: Slooooowwwww typing with python files
« Reply #7 on: August 24, 2012, 05:46:38 PM »
Do you have soft wrap turned on? On the off chance that these issues are related: http://community.slickedit.com/index.php/topic,8548.0.html

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Slooooowwwww typing with python files
« Reply #8 on: August 27, 2012, 06:53:50 PM »
I do not have soft wrap turned on for any of the file extensions that I use. The global setting for 'Enable soft wrap' is also unchecked. The global setting for 'break on word bondary' is a dash and that setting is enabled for many of my file extensions.

I have now reproduced the very slow typing when I am using C++ files. I can't send you my entire workspace and when I tried quickly to reproduce the error with just a few files, it wasn't showing up. I'm wondering if background tagging or something else with tagging is causing the issue. I have a small workspace with about 1,600 files in it of which only about 1,000 are taggable (others are internal languages that se doesn't know about).

I did have background tagging of open files and background tagging of other files enabled. I've currently disabled those and will test that way for a while. I really like having those on because code changes underneath me on compile and its easier to let the tagger take care of it rather than me having to try and remember to manually re-tag (lots of clicks) each time I change something. I'll let you know what I find.

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: Slooooowwwww typing with python files
« Reply #9 on: August 28, 2012, 11:08:31 AM »
I don't have soft wrap enabled either for the extensions with the issue, my global default setting is enabled, other settings as above.

Cheers

Dennis

  • Senior Community Member
  • Posts: 3998
  • Hero Points: 521
Re: Slooooowwwww typing with python files
« Reply #10 on: August 29, 2012, 06:33:39 PM »
This may be related to the problem others were having on the Mac editing XML.

Try turning off the horizontal scroll bar.  Tools > Options > Appearance > General > Horizontal Scroll bar > Off

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: Slooooowwwww typing with python files
« Reply #11 on: September 05, 2012, 11:47:43 AM »
Sorry been on PC.  Just been back on mac and checked.

I already have the horizontal scroll bar turned off.

One thing I did just notice, is that typing appears to keep up and NOT lag in '.h' files, but does lag in '.cpp'.

Also NOT lag in '.mm' files.

So for extensions I am using right now '.cpp' is the only one that visually lags behind fast input.


chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Slooooowwwww typing with python files
« Reply #12 on: September 05, 2012, 04:11:44 PM »
I'm seeing .cpp files lag intermittently while typing.  It happened to a lesser degree sometimes in v16, but now in v17 it can get to be pretty bad, where keystrokes can take up to a second to respond.

It seems like it could be related to the parsing/analysis functions that run for various as-you-type features (or maybe _as_callback which would have a similar impact to editing).  I've noticed that while I'm inserting/editing lines inside a function for example in the middle of a 4000 line file, various as-you-type features can get very sluggish.  I can't prove it yet, but it's starting to feel like the as-you-type parsing/analysis functions might be falling into degenerate cases that take too long when confronted with various patterns of invalid syntax (which can occur frequently while editing existing code).

This might explain the intermittency as well:  while editing it could be slow, then once the edit is done you try to troubleshoot the slowness but now it's fine.