unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Default of jit-lock-stealth-time
Date: Sun, 04 Mar 2007 01:18:40 +0200	[thread overview]
Message-ID: <uejo5oqzz.fsf@gnu.org> (raw)
In-Reply-To: <854pp21goy.fsf@lola.goethe.zz> (message from David Kastrup on Sat, 03 Mar 2007 16:37:33 +0100)

> Cc: rms@gnu.org,  emacs-devel@gnu.org
> From: David Kastrup <dak@gnu.org>
> Date: Sat, 03 Mar 2007 16:37:33 +0100
> >> 
> >> Apart from "pathological" buffers, paging through a file will deliver
> >> font locking fast enough to follow the user action
> >
> > Where ``fast enough'' means what, precisely?
> 
> The limiting factor is the speed with which the user types scrolling
> commands.

Does it keep up with the keyboard's autorepeat, for example?

> >> In contrast, left alone to jit-lock-stealth-time=16, Emacs will
> >> eventually turn to eating 100% of CPU time (not 1-3%)
> >
> > How can this happen?  JIT-lock is supposed to fontify at most
> > jit-lock-chunk-size characters (500 by default), and then refrain
> > from fontification for at least jit-lock-stealth-nice seconds (0.5
> > by default).  How can Emacs take 100% of CPU with these defaults?
> 
> It does.  If 0.5 seconds is small compared to the time it takes for
> the fontification, CPU load will be close to 100%.  Granted, I get
> more like 80% on an extended average, but it certainly is enough to
> drain the batteries, keep the fan running and render the system
> (inside and outside of Emacs) sluggish.

It sounds strange that fontification of 500 characters should take
time much longer than 0.5 seconds.  What happens if you increase the
value of jit-lock-stealth-nice, does the load go down proportionally?

> > David, your opinion was heard, loud and clear, several times
> > already.  There's no need to reiterate it.  Doing so just wastes
> > bandwidth.
> 
> I was commenting on your findings.  Do you mean to say that discussion
> of your findings is to be prohibited if that could point to the same
> conclusion?

I didn't mean anything except what I said.  And please cool down, we
are discussing technical issues that aren't supposed to get anyone
worked out.

> > For my part, I can say that investing a small fraction of CPU power
> > when none is used is by far wiser than annoying the user with
> > redisplay delays, if those are noticeable.
> 
> As I said: they are only noticeable when patterns are at work that
> make stealth fontification behave _untolerably bad_, without being
> debuggable.

Then perhaps fixing those bad patterns is a better way of dealing with
the problem.  Can you tell what files exhibit this bad behavior?  I'd
like to see what happens with them on my machines.

> The CPU power is not just invested when "none is used", it drains the
> power of the system, it suggests that Emacs is the _only_ application
> worthy to use CPU power at any time, anyway, and so it is fine for it
> to grab it without being asked.

We have customizations to take care of significant drain of power.  We
were discussing the defaults.  By default, I think Emacs should use up
a small fraction of CPU resources when it fontifies stealthily.  That
is what the default values try to accomplish.

  reply	other threads:[~2007-03-03 23:18 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-25 12:13 Default of jit-lock-stealth-time David Kastrup
2007-02-25 13:31 ` martin rudalics
2007-02-25 22:29 ` Kim F. Storm
2007-02-26  3:27 ` Richard Stallman
2007-02-26  4:56   ` Stefan Monnier
2007-02-26 19:52     ` Richard Stallman
2007-02-26 20:14       ` Eli Zaretskii
2007-02-27  7:39         ` Richard Stallman
2007-02-27 20:43           ` Eli Zaretskii
2007-02-28  7:27             ` Richard Stallman
2007-02-28 20:36               ` Eli Zaretskii
2007-03-01  8:14                 ` Richard Stallman
2007-03-01 15:18                   ` Stefan Monnier
2007-03-01 15:56                     ` David Kastrup
2007-03-01 16:00                       ` Lennart Borgman (gmail)
2007-03-01 16:54                     ` Stuart D. Herring
2007-03-01 16:57                       ` Lennart Borgman (gmail)
2007-03-01 17:00                         ` Stuart D. Herring
2007-03-01 17:13                           ` David Kastrup
2007-03-02  1:59                             ` Juanma Barranquero
2007-03-03 13:22                   ` Eli Zaretskii
2007-03-03 13:36                     ` David Kastrup
2007-03-03 15:10                       ` Eli Zaretskii
2007-03-03 15:24                         ` Daniel Brockman
2007-03-03 15:43                           ` David Kastrup
2007-03-04  2:00                           ` Richard Stallman
2007-03-03 15:37                         ` David Kastrup
2007-03-03 23:18                           ` Eli Zaretskii [this message]
2007-03-04  8:16                             ` David Kastrup
2007-03-04 13:29                         ` David Kastrup
2007-03-04 20:59                           ` Eli Zaretskii
2007-03-04 21:13                             ` David Kastrup
2007-03-07  1:05                               ` Miles Bader
2007-03-07  4:50                                 ` David Kastrup
2007-03-07  5:01                                   ` Miles Bader
2007-03-07 21:44                                     ` David Kastrup
2007-03-05  2:55                           ` Richard Stallman
2007-03-05  7:18                             ` David Kastrup
2007-03-04  2:00                     ` Richard Stallman
2007-03-04  8:42                       ` David Kastrup
2007-03-05  2:55                         ` Richard Stallman
2007-02-26 21:33       ` Stefan Monnier
2007-02-27  8:17       ` David Kastrup
2007-02-27 20:48         ` Eli Zaretskii
2007-02-28  2:37         ` Richard Stallman
2007-02-28  2:37         ` Richard Stallman
2007-02-26  7:16   ` David Kastrup
2007-02-26 19:53     ` Richard Stallman
2007-02-27  8:19       ` David Kastrup
2007-02-26  4:39 ` Stefan Monnier
2007-02-26  7:11   ` Romain Francoise
2007-02-26  7:35     ` David Kastrup
2007-02-26 10:20       ` Andreas Schwab
2007-02-26 10:43         ` David Kastrup
2007-02-26 10:56           ` Andreas Schwab
2007-02-27  7:38             ` Richard Stallman
2007-02-27  8:31               ` David Kastrup
2007-02-27 11:00               ` David Kastrup
2007-02-28  2:37                 ` Richard Stallman
2007-02-26 11:26           ` Juanma Barranquero
2007-02-26 11:28             ` David Kastrup
2007-02-26 14:56               ` Juanma Barranquero
2007-02-26 12:13             ` Jan Djärv
2007-02-26 10:24       ` Kim F. Storm
2007-02-26 13:42         ` martin rudalics
2007-02-26 14:26           ` Stefan Monnier
2007-02-26 16:32             ` martin rudalics
2007-02-26 15:10           ` David Kastrup
2007-02-26 15:22             ` Kim F. Storm
2007-02-26 16:44               ` martin rudalics
2007-02-26 22:55                 ` Kim F. Storm
2007-02-26 19:56       ` Eli Zaretskii
2007-02-26 21:34         ` Stefan Monnier
2007-02-26 23:19           ` Miles Bader
2007-02-27  0:43             ` Stefan Monnier
2007-02-27  2:10               ` Miles Bader
2007-02-27  4:57                 ` Stefan Monnier
2007-02-27  8:23                   ` David Kastrup
2007-02-27 20:54                     ` Eli Zaretskii
2007-02-27 20:59                       ` David Kastrup
2007-02-27 21:19                         ` Eli Zaretskii
2007-02-27 22:02                           ` David Kastrup
2007-02-28  4:42                             ` Eli Zaretskii
2007-02-28  6:35                               ` David Kastrup
2007-02-28 20:33                                 ` Eli Zaretskii
2007-02-28  7:27                           ` Richard Stallman
2007-02-28 20:39                             ` Eli Zaretskii
2007-02-27 23:21                         ` Stefan Monnier
2007-02-27  4:22           ` 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=uejo5oqzz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).