bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39790: 26.3; Painting text on macOS has becoming unbearably slow


From: John Wiegley
Subject: bug#39790: 26.3; Painting text on macOS has becoming unbearably slow
Date: Tue, 25 Feb 2020 10:39:36 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)

I use Emacs master as a dedicated ERC application window on macOS 10.15
(Catalina).

I've found that with current master (at least, up to the commit before the "no
text" bug I reported earlier), text redisplays *very very* slowly. In fact, I
can type faster than Emacs can display letters to me, hearkening back to ye
olde days of 110 baud modems.

I've done a Git bisect and discovered that this slow text behavior was
introduced in one of two commits. Since one of these does not compile, I could
not identify which one specifically, but it's either of:

3ad7813296760cecfd3fd35a5fb47930d61a573d
f674c905dc98a4617c40c4bc115462b4ad2ebfc2

Thus, 3ad7813296^ has fast text, as I've grown to expect, while f674c905dc has
very slow text.

The two commits are described as follows:

commit 3ad7813296760cecfd3fd35a5fb47930d61a573d (HEAD, 
refs/bisect/skip-3ad7813296760cecfd3fd35a5fb>
Author: Alan Third <address@hidden>
Date:   Sun Jul 28 15:19:19 2019 +0100

    Revert "Make all NS drawing be done from drawRect"

    This reverts commit 7946445962372c4255180af45cb7c857f1b0b5fa.

commit f674c905dc98a4617c40c4bc115462b4ad2ebfc2 (refs/bisect/bad)
Author: Alan Third <address@hidden>
Date:   Sun Feb 10 10:59:29 2019 +0000

    Draw to offscreen buffer on macOS

    * src/nsfns.m (x_set_background_color): Clear the frame after changing
    the background color, not before.
    * src/nsterm.h (drawingBuffer): New variable.
    ([EmacsView focusOnDrawingBuffer]):
    ([EmacsView copyRect:to:]):
    ([EmacsView createDrawingBufferWithRect:]): New methods.
    * src/nsterm.m (ns_update_begin):
    (ns_update_end):
    (ns_focus):
    (ns_unfocus): Handle drawing to offscreen buffer.
    (ns_clip_to_row): Use ns_row_rect.
    (ns_copy_bits): Remove unused function.
    (ns_scroll_run):
    (ns_shift_glyphs_for_insert): Use new scrolling method.
    (ns_draw_fringe_bitmap):
    (ns_dumpglyphs_image): When drawing to the offscreen buffer, flip
    images so they appear the right way up.
    (ns_dumpglyphs_stretch): Remove unnecessary code.
    (ns_draw_window_cursor): Don't disable screen updates.
    ([EmacsView updateFrameSize:]): Update the size of the offscreen
    buffer.
    ([EmacsView initFrameFromEmacs:]): Create offscreen buffer.
    ([EmacsView windowDidChangeBackingProperties:]):
    ([EmacsView createDrawingBufferWithRect:]):
    ([EmacsView focusOnDrawingBuffer]):
    ([EmacsView copyRect]): New methods.
    ([EmacsView viewWillDraw]): Remove method as it no longer does
    anything useful.
    ([EmacsView drawRect:]): Handle drawing from offscreen buffer.

Were a betting man, I'd guess the latter was the cause...

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]