unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Perry E. Metzger" <perry@piermont.com>
Cc: deng@randomsample.de, emacs-devel@gnu.org
Subject: Re: Speed of keyboard macro execution?
Date: Thu, 10 Dec 2015 19:53:11 +0200	[thread overview]
Message-ID: <83lh929omw.fsf@gnu.org> (raw)
In-Reply-To: <20151210123312.39c417c9@jabberwock.cb.piermont.com>

> Date: Thu, 10 Dec 2015 12:33:12 -0500
> From: "Perry E. Metzger" <perry@piermont.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> 
> On Thu, 10 Dec 2015 18:27:49 +0100 David Engster
> <deng@randomsample.de> wrote:
> > Perry E. Metzger writes:
> > > I don't know if it was disingenuous or not, but I think that being
> > > able to improve performance would not be a bad thing.
> > 
> > No one is claiming that. AFAIK, the very-long-line problem is not
> > easy to fix.
> 
> Perhaps it isn't. Looking at the old thread, it seems like the bidi
> code is one of the culprits.

No, if this is your conclusion, you are not reading it right.  The
bidi code makes the awfully slow cases slower, but they are awfully,
unbearably slow even when bidi is turned off.  IOW, in practical
terms, bidi didn't change anything in those cases: half the infinity
is still infinity.

> OTOH, if I read this right and the problem is partially slow
> redisplay, I'm wondering why the redisplay code needs to be involved
> at all if a long keyboard macro is being run. Perhaps there should
> be some way to suspend redisplay, perform the macro, and then
> restart it? I have to admit I haven't looked at the code involved
> and it might be utterly infeasible.

This I can explain.  "Redisplay" comes into play not only for actually
redrawing the screen, it also comes into play when, e.g., a command
moves cursor down, as in C-n.  With (the default) line-move-visual
mode, Emacs no longer has an easy way of knowing what character is
directly below the current one, what with all the variable-pitch fonts
and long lines broken between several screen lines.  The only way of
finding out where is "one visual line down" is to _simulate_
redisplay.  IOW, Emacs runs code that does exactly what redisplay
does, but without displaying anything; it just accumulates pixel
coordinates until it finds itself one visual line down.

Any keyboard macro that moves point will at some point invoke this
code, because moving point in a variable-pitch multi-font display is a
hard problem, and this is even before we consider complications like
display properties, overlay strings, embedded images, and the other
calamities.



  parent reply	other threads:[~2015-12-10 17:53 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 21:39 Speed of keyboard macro execution? Perry E. Metzger
2015-12-09 22:13 ` David Engster
2015-12-09 23:03   ` Perry E. Metzger
2015-12-10 16:43     ` Eli Zaretskii
2015-12-10 17:00       ` Perry E. Metzger
2015-12-10 17:14         ` John Wiegley
2015-12-10 17:27         ` David Engster
2015-12-10 17:33           ` Perry E. Metzger
2015-12-10 17:39             ` David Engster
2015-12-10 17:53             ` Eli Zaretskii [this message]
2015-12-10 18:10               ` Perry E. Metzger
2015-12-10 18:41                 ` Eli Zaretskii
2015-12-10 18:44               ` David Kastrup
2015-12-10 18:57                 ` Eli Zaretskii
2015-12-10 19:38                   ` David Kastrup
2015-12-10 20:00                     ` Eli Zaretskii
2015-12-10 20:09                       ` David Kastrup
2015-12-10 20:43                         ` Eli Zaretskii
2015-12-10 20:55                           ` David Kastrup
2015-12-10 20:16                       ` Perry E. Metzger
2015-12-10 20:18                         ` John Wiegley
2015-12-10 20:36                           ` David Kastrup
2015-12-10 20:43                             ` John Wiegley
2015-12-10 21:01                               ` David Kastrup
2015-12-10 21:26                                 ` John Wiegley
2015-12-10 23:35                                   ` David Kastrup
2015-12-11  1:14                                     ` John Wiegley
2015-12-11  6:27                                       ` David Kastrup
2015-12-12 22:56                                         ` John Wiegley
2015-12-12 23:46                                           ` David Kastrup
2015-12-13  0:16                                             ` John Wiegley
2015-12-13  0:32                                               ` David Kastrup
2015-12-12 23:20                                     ` Per Starbäck
2015-12-12 16:51                                   ` Perry E. Metzger
2015-12-12 17:42                                     ` David Kastrup
2015-12-12 23:01                                     ` Disabling visual lines for macros (was: Speed of keyboard macro execution?) John Wiegley
2015-12-12 23:33                                       ` Disabling visual lines for macros David Kastrup
2015-12-10 20:45                             ` Speed of keyboard macro execution? Perry E. Metzger
2015-12-10 20:50                               ` John Wiegley
2015-12-10 20:48                             ` Eli Zaretskii
2015-12-10 20:50                               ` John Wiegley
2015-12-10 21:13                               ` David Kastrup
2015-12-10 17:37         ` Eli Zaretskii
2015-12-10 17:43           ` John Wiegley
2015-12-10 17:54             ` Eli Zaretskii
2015-12-10 18:15       ` Achim Gratz
2015-12-10 18:47         ` Eli Zaretskii
2015-12-12  2:14       ` Joseph Mingrone
2015-12-12  7:39         ` Eli Zaretskii
2015-12-12 17:28           ` Joseph Mingrone
2015-12-12 17:57             ` Eli Zaretskii
2015-12-12 18:12               ` Joseph Mingrone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lh929omw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=deng@randomsample.de \
    --cc=emacs-devel@gnu.org \
    --cc=perry@piermont.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).