Author Topic: Space Bar and Saving File Causing Lag - Slickedit 13  (Read 3928 times)

longphant

  • Community Member
  • Posts: 11
  • Hero Points: 0
Space Bar and Saving File Causing Lag - Slickedit 13
« on: October 07, 2013, 03:45:17 PM »
I know that I have an older version of Slickedit, but it's what i have. I am running it on RHEL 5.5.

When I am typing anything in the editor, it lags whenever I hit the space button. Example being a sentence that I want to printf. I can be typing random characters, but once I press space, the editor lags for 2-3 seconds before continuing on. Depending on how long I type for, I then have to wait for the lag to catch up and finish typing my sentence. How do I fix this?

Also, saving a file takes 2-3 seconds. My workspace files are local. The tag file is local. The workspace has 20,000 files.

I have this same installed version on another machine with opensuse on it with the same specs. There is no lag on that machine.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Space Bar and Saving File Causing Lag - Slickedit 13
« Reply #1 on: October 07, 2013, 04:42:56 PM »
What language is the file you're typing in?
What is the file's extension?  (.cpp, .cs, .pl, .txt, etc)
What is the space key bound to?
You can find out by opening that file, then press Escape and type "what-is" at the prompt in the status bar and hit Enter, then press Space -- it should say in the status bar what command the key is bound to.  (It's important to have the problematic file open and the active buffer when you do that, since different languages can have different key bindings).

longphant

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Space Bar and Saving File Causing Lag - Slickedit 13
« Reply #2 on: October 07, 2013, 05:44:16 PM »
I am typing in a .c file. It is under C/C++.
Space bar is bound to "c-space".

According to the key bindings page.
Code: [Select]
New binding of SPACE key when in C mode. Handles syntax expansion and indenting forfiles with C or H extension. Use the C Options dialog box ("Tools", "Options", "File Extension Setup...", select C extension, "Options...") to change the main style.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Space Bar and Saving File Causing Lag - Slickedit 13
« Reply #3 on: October 07, 2013, 07:08:26 PM »
Try turning off the "Auto-list compatible parameters" feature under your C/C++ Context Tagging options.

If that doesn't do the trick, you can always profile and see where the time is being spent.  Macro > Slick-C Profiler.

longphant

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Space Bar and Saving File Causing Lag - Slickedit 13
« Reply #4 on: October 11, 2013, 05:44:32 PM »
I have already turned this off and it still causes lag when I hit space bar.

Also, my version of Slickedit does not have the Profiler, it is Slickedit 13. I am assuming the profiler came out in a later version.

Any other ideas?

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Space Bar and Saving File Causing Lag - Slickedit 13
« Reply #5 on: October 16, 2013, 02:15:32 PM »
Actually, the Slick-C profile has been in the product since version 11.0, but it was only added to the main menu in later releases.

You can launch the profile in v13 using the "profile" command from the SlickEdit command line.  You can then finish the profiling session by typing "profile view" from the command line.  You can also use "profile save" to save the profiling information.  When you do this, be careful not to expand tabs to spaces or change line endings or otherwise mess up the file's formatting.  You should be able to get a general idea where the time is being spent from just viewing the profiling data and seeing the names of the Slick-C functions being called.

A lot of performance improvements have gone into SlickEdit since v13, so you may also want to think about upgrading.  It will be worth it.

longphant

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Space Bar and Saving File Causing Lag - Slickedit 13
« Reply #6 on: October 16, 2013, 03:39:09 PM »
Thank you for this information.
I ran the profiler and just typed "blah blah blah blah blah blah" in the editor. Every time I hit space, Slickedit would lag for 2-3 seconds before responding. I typed the entire sentence as quickly as I could and it took another 5-6 seconds before Slickedit caught up and typed the entire thing. Screenshot below (also attached it). It seems the offender is min_abbrev2, which looks to be called by c_space.


Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Space Bar and Saving File Causing Lag - Slickedit 13
« Reply #7 on: October 16, 2013, 04:06:28 PM »
Looks like the time is being spent in alias expansion.  A quick workaround would be to turn off "Syntax expansion" (Document > C/C++ options > Indent > Syntax expansion).  This will also turn of alias expansion on space.  You'll still be able to expand aliases by hitting Ctrl+Space.  Unfortunately, syntax expansion for statements like "if" and "for" will be disabled by this.  Newer versions of SlickEdit have a separate option for this.

The profiling really points to alias expansion, so maybe you have too many aliases set up for that poor old v13 editor.

longphant

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Space Bar and Saving File Causing Lag - Slickedit 13
« Reply #8 on: October 16, 2013, 04:19:14 PM »
Hi, thank you all for your help.

I think I found the issue. My config file was being saved in a network mapped directory and now that I used the -sc command line arg to place it somewhere on my hard drive, there doesn't seem to be anymore lag. Thank you all for the help!