Results 1 to 10 of 10

Thread: emacs file saving very slow

  1. #1
    Join Date
    Aug 2007
    Beans
    25

    emacs file saving very slow

    Sometimes, after using Emacs for a while, saving becomes extremely slow, e.g. 30 seconds to save a file that was saved instantly a few moments ago.

    Logging out and back in usually solves the problem for a while, but it always seems to come back.

    I can see no other processes that are swamping the CPU, or other obvious problems (e.g. closing all other applications doesn't seem to help).

    Suggestions about how I can go about debugging this problem would be appreciated.

    Thanks.

  2. #2
    Join Date
    Oct 2011
    Location
    Chicago, IL
    Beans
    419
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: emacs file saving very slow

    Does that include processes that may be using lots of memory?

  3. #3
    Join Date
    Aug 2007
    Beans
    25

    Re: emacs file saving very slow

    Yes, I've checked memory and CPU usage via top while emacs is running slowly, and there is no obvious culprit.

  4. #4
    Join Date
    Aug 2007
    Location
    Novocastria, Australia
    Beans
    754
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: emacs file saving very slow

    I know this is an obvious question, but is the file being saved locally or on a network?

  5. #5
    Join Date
    Aug 2007
    Beans
    25

    Re: emacs file saving very slow

    Its local storage.

  6. #6
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: emacs file saving very slow

    0. Why has this been posted here? I think this should be moved to General Help, even though the "offending" application is a programming-related one.

    1. Which OS are you using? No, this is not an obvious question: some people on these forums don't use Ubuntu. Even if it's Ubuntu, what version do you use? Have you checked for related bug reports?

    2. Is it just emacs or other programs are also showing some lag? We should first prove that it is just emacs and something else what's having problems.

  7. #7
    Join Date
    Aug 2007
    Beans
    25

    Re: emacs file saving very slow

    I assume that mostly programmers use emacs, so it is more likely that programmers would either have experienced the problems I am having, or have ideas about how to go about debugging it.

    I'm using Ubuntu 10.04 with XFCE (upgrading to a newer version is not an option for me right now).

    No other programs seem to show any related problems: it's just emacs.

  8. #8
    Join Date
    Sep 2009
    Location
    Canada, Montreal QC
    Beans
    1,809
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: emacs file saving very slow

    Did you do any modifications to your .emacs file before this problem appeared?
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones.
    Freedom is measured in Stallmans.
    Projects: gEcrit

  9. #9
    Join Date
    May 2006
    Beans
    1,787

    Re: emacs file saving very slow

    Some random thoughts to understand the problem better:

    When it takes 30 seconds to save a file, is it the case that the runtime for the Emacs process increases with 30 seconds?

    If you run without .emacs, does the same phenomenon occur?

    You may prepare a debugger and attach to the Emacs process, and then interrupt it when a saving takes really long, but I don't know if that will show anything at all.

    You could start Emacs with strace, and look at the system calls done during such a long save.

  10. #10
    Join Date
    Jan 2013
    Beans
    1

    Re: emacs file saving very slow

    Put this in your ~/.emacs:

    ;; fix for slow emacs when saving files
    (setq vc-handled-backends nil)

    That worked for me.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •