all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: romain@orebokech.com, emacs-devel@gnu.org
Subject: Re: Very long lines in shell-mode
Date: Wed, 06 Dec 2006 23:59:33 -0500	[thread overview]
Message-ID: <E1GsBM5-00026X-Jm@fencepost.gnu.org> (raw)
In-Reply-To: <jwvejrcc336.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Wed, 06 Dec 2006 13:10:49 -0500)

    Most likely the 2MB line will be inserted in the buffer in many little
    chunks of maybe 4KB or so: for each chunk font-lock may decide to refontify
    the whole line.  Each fontification step takes time proportional to the
    length of the line, so you get O(n^2) behavior.

    And this is without even considering the regexps involved which may very
    likely add a factor of n to that.

    Maybe for such cases, font-lock should have a "sanity check" and either not
    fontify the line at all, or fontify only a part of it at a time.

A possible simple solution: in Shell mode, don't fontify a line that
doesn't end in a newline.  If that solves the problem, it would be
simple enough to install now.

  reply	other threads:[~2006-12-07  4:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 17:44 Very long lines in shell-mode Romain Francoise
2006-12-06 18:10 ` Stefan Monnier
2006-12-07  4:59   ` Richard Stallman [this message]
2006-12-07  9:23     ` Kim F. Storm
2006-12-08  5:04       ` Richard Stallman

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

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

  git send-email \
    --in-reply-to=E1GsBM5-00026X-Jm@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=romain@orebokech.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.