SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: rajkej on November 10, 2020, 09:10:48 PM

Title: Using V25 on MAC is very slow
Post by: rajkej on November 10, 2020, 09:10:48 PM
I have been really trying to use SE 25.0.0.9 on MAC for a while. I posted earlier about some issues with the auto complete. In trying to understand what is going on I went ahead and created a new configuration and loaded my project. Now I can't even type with most of the default SE settings. I type one character and SE goes to sleep for seconds and ignores all my other typing. After about 4-5 seconds then I can type another character.

So I turned on profiling and typed "F" and got the following profiling results (see attached, I couldn't cut the text and paste it).

To create this I completely deleted my setup directory ~Library/Application Support/SlickEdit/25.0.0 and started SE. Then I went through the quick setup and then did a few other changes to key settings that I use (key bindings, font, colors). I did disable background tagging as my projects have only a hundred or two files each so tag quickly.

There has to be something different in my setup to cause this type of thing. It makes V25 unusable to me. If you have any suggestions, I'll take a look.

I did notice the "get_all_specific_JDK_paths_mac" taking a long time in that report. I have no java in my project.
Title: Re: Using V25 on MAC is very slow
Post by: Dennis on November 10, 2020, 09:28:50 PM
Try loading this experimental hot fix.  These changes will be in the first hot fix for 25.0.0.9.
Title: Re: Using V25 on MAC is very slow
Post by: rajkej on November 10, 2020, 09:36:43 PM
That was a definite improvement. Thank you!
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 11, 2021, 07:36:45 PM
I'm using v25.0.1.0. I've been a user for a very long time. The performance on Mac has always been abysmal, but this is the worst so far.

It's faster if I close all projects, but it's still excruciatingly slow.

I have all the symptoms of the OP, but even worse. Scrolling (line up, down) is really slow. Typing is really slow. At this point vi is better.


Title: Re: Using V25 on MAC is very slow
Post by: Dennis on January 11, 2021, 08:05:43 PM
The longest running call in your profiling results took 1/8th second.

What language are you using primarily?  How large are your projects?  What are you doing when you notice performance hits?  Are you running on a native desktop or a remote display?
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 11, 2021, 10:03:06 PM
> What language are you using primarily?
C/C++
some objective-c in other projects.

> How large are your projects?
The size doesn't seem to matter. But, in this project ~5500 files

> What are you doing when you notice performance hits?
Anything. Moving the cursor up/down/left/right using the arrow keys. Trying to type/edit/change code. In this particular capture, I just hit arrow up and caught a second or two.

> Are you running on a native desktop or a remote display?
Native desktop. Latest macOS Big Sur. Mac Pro 2013 32GB.

TBH, it's been an issue in the past as well. I've filed support tickets in the past, but never got a good resolution. It's just gotten worse.
Title: Re: Using V25 on MAC is very slow
Post by: Dennis on January 11, 2021, 10:19:25 PM
Could you do a longer performance (Slick-C Profiling) capture so we could get more useful results?

If that does not yield good results, I might have you also sample the process from the Activity Monitor to see what's going on a the compiled code level.
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 12, 2021, 01:42:33 AM
Here you go.

I noticed the profiling only captures things with macros. What about the AppKit side of things?
Title: Re: Using V25 on MAC is very slow
Post by: Dennis on January 12, 2021, 02:47:10 AM
I'm not sure if you're collecting the profiling results correctly. 
Again, in your submission, the total time spent for the longest running
Slick-C macro was less that 1/5 second, and the auto-save timer was only
ran 14 times, so that's a duration of at most 4 seconds.

Do the following:

  1) Macro > Slick-C Profiling > Begin Profiling
  2) Work in the editor for five minutes or more,
      do things like scrolling and moving around and typing
      that have triggered the observed performance hits for you
  3) Macro > Slick-C Profiling > Finish Profiling...
  4) Capture a fresh screen shot
  5) OR, Macro > Slick-C Profiling > Save...
      and submit the profile.tsv created.

That does just capture time spent in the Slick-C interpreter.

To capture profiling data about the application in general,
do the following:

  1) Open a Terminal window
  2) Use the command "sample SlickEditPro2020 30 >vs30.txt"
       to take a thirty second sample of SlickEdit
  3) make sure you do something that triggers the performance hit in those 30 seconds.
  3) zip up vs30.txt and post it here.

You can also sample the process using Activity Monitor, but the default sample time is only 10 seconds, so it might be hard to reproduce anything in that time.
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 12, 2021, 04:49:14 AM
The slick profiling is correct. That was about 30 seconds of up/down cursor movement. Auto-Save was disabled, so I don't know why that's even running. I turned off half the features, since the user interaction is so poor.

Here's a time sampling log, with some usage.

Title: Re: Using V25 on MAC is very slow
Post by: Dennis on January 12, 2021, 03:22:48 PM
That helps some.  Looks like the majority of time was spent in drawing.
I need a little bit more information:

1) Could you post your Help > About info for SlickEdit
2) Also your user.cfg.xml from your SlickEdit configuration directory.
3) Finally, you could experiment with tweaking the Mac specific settings in
    Tools > Options > Appearance > Advanced.

     a) In particular, try all three settings for Retina support
     b) I do not know if you have a Retina display or if you are using scaling
         but there are cases where Auto-Detect gets it wrong.
     c) Note that those settings require fully closing and restarting SlickEdit.
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 12, 2021, 06:08:19 PM
I'm not using a Retina display with the editor. I can run notepad, vi, etc. next to SlickEdit and it's much more responsive, and faster to type.

attached as requested.
Title: Re: Using V25 on MAC is very slow
Post by: Dennis on January 12, 2021, 06:56:50 PM
Did you try changing any of the Mac options under Tools > Options > Appearance > Advanced?  I see that you have the fast scrolling option turned off and Retina mode in Auto-Detect.
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 12, 2021, 08:10:54 PM
Yes, I tried changing the Retina mode. It had no effect.
Title: Re: Using V25 on MAC is very slow
Post by: Dennis on January 12, 2021, 08:12:54 PM
And did you try turning on the fast scrolling option?
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 12, 2021, 08:37:49 PM
> fast scrolling option?

Yes, on and off. It's on by default. Off was slower.
Title: Re: Using V25 on MAC is very slow
Post by: Dennis on January 13, 2021, 03:26:59 PM
OK, let's try this.

1) Open <slickedit>/macros/ada.e in your editor
2) Go to line 1.
3) Use a stopwatch app on your phone or a physical stopwatch to time this
4) Hold down the cursor-down key until you hit the bottom of the file.
5) Let me know how many seconds that takes.

Now close the editor and from a Terminal, open a new instance with a default configuration:
Code: [Select]
    open -a SlickEditPro2020 --args -sc /tmp/defcon1
Then repeat the steps above again.  Just to see if there is any difference.

Also, are any of your source files on a remote file system?

Also, do you have the mini-map feature enabled?  I noticed that you had the "Delayed Minimap Update for Faster Scrolling" disabled in your configuration.

Finally, how may source files do you typically have open in the editor at once?  Do you mainly see delays when editing files with very long lines?

Do you have SoftWrap enabled?
Title: Re: Using V25 on MAC is very slow
Post by: rajkej on January 13, 2021, 04:03:26 PM
Just to give you data points from another user:

1) SE 25.0.1, my config, hold down cursor down key, ada.e, 181 seconds (~10 lines/second)
2) Textedit, hold down cursor down key, ada.e, 186 seconds

When I use the mouse scroll wheel or page down in SE, I can get through the file (ada.e) very quickly. Page down is ~4 seconds, mouse scroll wheel takes me ~10 seconds.

My keyboard repeat in system preferences, keyboard, is set at the max slider location minus one tick. My delay until repeat is on the 'short' setting. I'm running catalina 10.15.7.

So then I did a key repeat test by making a new file in SE and holding down the 'a' key.

3) SE 25.0.1, my config, hold down 'a' key. 98 chars in ~10 seconds, still ~10 key repeat/second.

Then I changed my keyboard repeat to the max slider location, the delay between is still set to 'short'

4) SE 25.0.1, my config, hold down cursor down key, ada.e, 60 seconds, ~30 key repeat/second.

And to be complete, I did the open with new config you mentioned. This is with the keyboard repeat to the max slider location and delay set to short just like test 4.

5) SE 25.0.1, clean config, hold down cursor down key, ada.e, 60 seconds.

HTH
Title: Re: Using V25 on MAC is very slow
Post by: Clark on January 13, 2021, 04:08:30 PM
> fast scrolling option?

Yes, on and off. It's on by default. Off was slower.

It does seem like something odd is going on with the settings you are using. I haven't quite figured it out. If you turn off the minimap, that seems to improve things. Using the minimap with a default config does not have any scrolling performance problems.
Title: Re: Using V25 on MAC is very slow
Post by: Clark on January 13, 2021, 04:26:43 PM
If I removed the following settings from your "user.cfg.xml", then I get good performance

<minimap_delayed_updating v="0"/>
<mac_use_scroll_performance_hack v="0"/>

I would have thought you would only need to remove the first setting but the second setting must be removed as well.

The first setting is accessible from the context menu of the minimap "Delayed Minimap Updating for Faster Scrolling". You have turned this off. You definitely want this turned on.

The second setting is here: Tools>Options>Appearance>Advanced>macOS faster editor scrolling.  You have this turned off. Turn this back on.
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 13, 2021, 07:02:12 PM
1) Open <slickedit>/macros/ada.e in your editor
2) Go to line 1.
3) Use a stopwatch app on your phone or a physical stopwatch to time this
4) Hold down the cursor-down key until you hit the bottom of the file.
5) Let me know how many seconds that takes.

Now close the editor and from a Terminal, open a new instance with a default configuration:
Code: [Select]
    open -a SlickEditPro2020 --args -sc /tmp/defcon1
Then repeat the steps above again.  Just to see if there is any difference.

Thanks Denis. This is very helpful.

Code: [Select]
SlickEdit with my config and a workspace open - 136s
SlickEdit with my config and a workspace closed - 133s
SlickEdit with default config - 64s
TextEdit - 60s
Visual Studio Code - 60s

Also, are any of your source files on a remote file system?

No.

Also, do you have the mini-map feature enabled?  I noticed that you had the "Delayed Minimap Update for Faster Scrolling" disabled in your configuration.

Yes it is enabled. I will look for it and turn it on. I haven't touched that, so whatever has been imported over the years. Just to be clear.

Just to be clear, scrolling is just one of the issues. I have a ton of problems trying to edit code.

I've been using SlickEdit for ~30 years. I started with the command line version (it would be great if that was still around too). The Visual SlickEdit, I believe I've updated from version to version over that time frame. I can't be entirely sure what I did as I changed jobs. There may have been some clean restarts over time, but I just can't recall.

Finally, how may source files do you typically have open in the editor at once?  Do you mainly see delays when editing files with very long lines?

It is hard to say exactly. I have anywhere from 10-50 or more. In this particular case, I'm making a small change and only have about 10 files open.

I do notice there are performance issues when I open a Xcode project vs a just using a directory, as well. But, one step at a time. The main issues are navigation and code editing.

Do you have SoftWrap enabled?

No. I did not turn that on. Where is this setting and how to turn it off, if on?

If I removed the following settings from your "user.cfg.xml", then I get good performance

<minimap_delayed_updating v="0"/>
<mac_use_scroll_performance_hack v="0"/>

Thanks, that helps a lot. The last one was on already. I must've posted the file while doing experiments with Dennis. I did not realize I turned off the minimap optimization. I haven't timed it, but it seems much more responsive already.

I'll give it a go with code modifications and see if those problems persist as well.

Side question. I'd like to purge a lot of my config, what's the best way to set certain things back to default? As mentioned, I import my config over years and I really don't recall what most things are configured as. The most important to me are the colors, and the whitespace management (different projects have different requirements, don't ask...).
Title: Re: Using V25 on MAC is very slow
Post by: Clark on January 13, 2021, 07:25:04 PM
To fix your scrolling performance problem do the following:

if I remove the following settings from your "user.cfg.xml", then I get good performance

<minimap_delayed_updating v="0"/>
<mac_use_scroll_performance_hack v="0"/>

I would have thought you would only need to remove the first setting but the second setting must be removed as well.

The first setting is accessible from the context menu of the minimap "Delayed Minimap Updating for Faster Scrolling". You have turned this off. You definitely want this turned on.

The second setting is here: Tools>Options>Appearance>Advanced>macOS faster editor scrolling.  You have this turned off. Turn this back on.
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 13, 2021, 07:27:27 PM
To fix your scrolling performance problem do the following:

Thanks Clark, already called you out in my prior response. :) Yes, that helps that. Now I just need to see if it affects my code editing problem as well, which may take a bit longer as I'm doing other things at the moment.
Title: Re: Using V25 on MAC is very slow
Post by: Clark on January 13, 2021, 07:31:02 PM
These changes were night and day for me. Did you accidentally turn off the "Delayed Minimap Updating for Faster Scrolling" setting? We may need to remove support for this for macOS. Using this setting for any other platform does not destroy scrolling performance.
Title: Re: Using V25 on MAC is very slow
Post by: nunya on January 13, 2021, 08:07:01 PM
Did you accidentally turn off the "Delayed Minimap Updating for Faster Scrolling" setting?

I think so. I'm not really sure how that turned off, as I don't ever recall touching it from the GUI.