1

At the weekend I wiped my dotfiles and replaced them with prelude. I do most of my work in C#, so I've got csharp-mode installed.

Typing in c# is laggy, in a painful bursty way. A few words come out smoothly, then there's a big pause over the next few words. There's no problem with moving the cursor around or scrolling the buffer.

I've tried turning off minor modes on a buffer and continuing to type. I've disabled the following with no change to the problem:
- projectile-mode
- company-mode
- guru-mode (think this is a prelude thing?)
- flycheck-mode

My mode line says I've got C#/l, MRev, Helm, SP, Pre and Abbrev still running. They all seem pretty important.

There's nothing in the messages buffer when these pauses occur.

I'm using emacs 24.4.

Is there any keystroke profiling I can turn on, to see what's slowing things down?

Jordon Biondo
  • 12,332
  • 2
  • 41
  • 62
tenpn
  • 395
  • 2
  • 14
  • 1
    Use `describe-mode` to see a list of enabled minor modes, continue to disable them one by one. – Jordon Biondo Apr 13 '15 at 13:39
  • 2
    As for profiling, there's a built-in command `profiler-start`. Try starting the profiler, editing until you get the lag, and then stop the profiler and inspect the output. – nanny Apr 13 '15 at 13:44

1 Answers1

1

With help from nanny and jordan biondo, I profiled, entered some newlines in a class, and found the following:

imenu-update-menubar

I don't tend to use imenu anyway, so I customised csharp-want-imenu to nil, rebooted, and now things are much much better.

Good work everyone!

tenpn
  • 395
  • 2
  • 14
  • You're lucky, in my case it's lagging `…lock-fontify…` functions, and seems here's nothing I can do. By the way, «imenu» is actually cool thing — try to use it with `idomenu` function, it's great. – Hi-Angel May 06 '15 at 13:05