unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 16830@debbugs.gnu.org, stefan.hahn@s-hahn.de
Subject: bug#16830: [Bug] 24.3.50; massive slow down in forward-line
Date: Tue, 11 Mar 2014 19:03:19 +0200	[thread overview]
Message-ID: <83lhwgoeg8.fsf@gnu.org> (raw)
In-Reply-To: <531EC497.5040907@gmx.at>

> Date: Tue, 11 Mar 2014 09:08:55 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>, 
>  Stefan Monnier <monnier@iro.umontreal.ca>,
>  16830@debbugs.gnu.org
> 
>  > Until we can dynamically estimate the line length and turn the cache
>  > on only for long lines, I suggest to leave the default ON, and install
>  > the patches below.  My reasoning is that in most situations the
>  > slow-down is negligible, while for very long lines the speedup can be
>  > significant.
> 
> In general I inspect long lines only in bug reports.  Is that sufficient
> reason to not follow the advice
> 
>     There is no reason to set this to nil except for debugging purposes.
> 
> after your patch is applied?

Actually, I suggest to only change the default if you ever see a
tangible difference with and without the cache.

If you review the timings I posted, you will realize that a single
call to find_newline takes a fraction of a microsecond on a reasonably
modern machine, so unless you use code that calls forward-line with a
very large argument, like hundreds of thousands, you will never see
the difference.

Also, turning off cache-long-scans disables not only the newline
cache, but also 2 other caches, at least one of which (the bidi
paragraph start cache) might be important for redisplay speed, and
doesn't suffer from the slowdown I discovered with the newline cache,
because the way we use that cache is very different.





  reply	other threads:[~2014-03-11 17:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 12:16 bug#16830: [Bug] 24.3.50; massive slow down in forward-line Stefan-W. Hahn
2014-02-21 12:32 ` Eli Zaretskii
2014-02-21 15:51   ` Stefan-W. Hahn
2014-02-21 17:50     ` Stefan Monnier
2014-02-22  8:38       ` Stefan-W. Hahn
     [not found]       ` <20140222083926.GC27381@pille.home>
2014-02-22  9:18         ` Eli Zaretskii
2014-02-22 11:08           ` Stefan-W. Hahn
2014-02-22 11:29             ` Eli Zaretskii
2014-02-22 11:36               ` Eli Zaretskii
2014-02-22 12:33                 ` Stefan-W. Hahn
2014-02-22 12:55                   ` Juanma Barranquero
2014-02-22 15:06                     ` Stefan-W. Hahn
2014-02-22 13:05                   ` Eli Zaretskii
2014-02-21  7:43                     ` Stefan-W. Hahn
2014-02-23 18:04                       ` Eli Zaretskii
2014-02-22 12:27               ` Stefan-W. Hahn
2014-03-10 18:58                 ` Eli Zaretskii
2014-03-11  8:08                   ` martin rudalics
2014-03-11 17:03                     ` Eli Zaretskii [this message]
2014-03-12 14:12                     ` Stefan Monnier
2014-03-16 16:32                       ` Eli Zaretskii
2014-03-17 15:05                   ` bug#16830: " Dmitry Antipov
2014-03-17 16:39                     ` Eli Zaretskii
2014-06-22 16:50                       ` Eli Zaretskii

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=83lhwgoeg8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=16830@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    --cc=stefan.hahn@s-hahn.de \
    /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).