Skip to content

Improving the performance of Emacs’s Display Engine?

by mickey on October 2nd, 2011

I came across an interesting thread on the GNU Emacs developer mailing list about an obscure variable called redisplay-dont-pause and I figured I’d talk about it.

So, currently, if Emacs is busy redrawing the screen any input event (keyboard, mouse) will halt the redrawing and abort to handle the input event. The obvious benefit here is that the user will get a smoother typing experience, especially on older machines where display updates were slow. Nowadays, though, you could argue that this is an unnecessary and very conservative setting as it will cause screen tearing.

The variable redisplay-dont-pause, when set to t, will cause Emacs to fully redraw the display before it processes queued input events. This may have slight performance implications if you’re aggressively mouse scrolling a document or rely on your keyboard’s auto repeat feature. For most of us, myself included, it’s probably a no-brainer to switch it on.

Add this to your .emacs file to enable this functionality:

4 Comments
  1. Phil permalink

    Interesting. Personally I think I’ll be leaving this the way it is, because I don’t recall ever being bothered by this behaviour, and it probably still has potential benefits when running Emacs remotely over a slow ssh connection?

    • Yes, what are the implications for X forwarding. Is there a way to test whether the current emacs session is being forwarded over X and if not, then one would make this change? Just a thought.

      • mickey permalink

        Good question. I’m not entirely sure, actually, if there is an easy and obvious way of testing for that. I think X was always designed so that applications shouldn’t care — in theory anyway?

  2. ako permalink

    From: Ako I, Tsuda College, Tokyo

    My name is Ako I. I am a Computer Science major at Tsuda College. We are doing a project about Global Collaboration.

    I am sorry to bother you, but I was wondering if you could answer a few of my questions by e-mail. This would be a huge help to me and my class.
    For example:

    Q1 Why do you develop? I want to know the reason.
    Q2 How do you collavorate with many people?

    I look forward to receiving your reply.

    Yours sincerely

    Ako I

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS