0

After using a emacs for a while all I see is Garbage collecting...done in the modeline. At this point emacs is constantly garbage collecting but can't free any memory and has to be restarted. Emacs is sluggish in general on this machine, even after a fresh restart, as it's constantly garbage collecting so something is clearly wrong.

I've tried all builds I could think of for emacs. I've installed 24.5 and 25.1 from brew. I've tried the binaries same binaries from emacsforosx.com. Right now I'm running the version at https://github.com/railwaycat/mirror-emacs-mac, as a last try.

Everyone I've talked to is happily using emacs on a mac so it's clearly nothing wrong with emacs itself. How can I find out which package / function is causing this nightmare?

I'm on a brand new macbook pro running the latest version of el capitan.

  • 2
    I think you'll have to disable all packages and slowly enable each package one by one until you track it down -- each time you add back a portion of your user configuration, restart Emacs and run some tests to see if the problem reoccurs. You'll also have to comment out all of your user-configuration and slowly enable that as well. – lawlist Apr 22 '16 at 13:21
  • 1
    You could speed up the process by trying a binary search. Disable about half your config. If the problem persists, disable half of what's left, and so on. Otherwise, disable the other half instead. It gets trickier if the problem is due to an interaction between two packages, though. – Harald Hanche-Olsen Apr 22 '16 at 13:29
  • What @HaraldHanche-Olsen said. Do not "slowly enable each package". Instead, recursively bisect your init file until you find the culprit. But of course, start first with emacs -Q, to see if the problem is even caused by your init file. In any case, do not bother to try different Emacs versions if the problem is not evident with emacs -Q. – Drew Apr 22 '16 at 18:01
  • I would add to @HaraldHanche-Olsen's advice: Start by finding a reliable way to trigger the problem, preferably quickly and automatically. Time invested in that will pay itself back when you start "bisecting" your configuration. – asjo Apr 27 '16 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.