all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: Barry OReilly <gundaetiapo@gmail.com>, 15011@debbugs.gnu.org
Subject: bug#15011: 24.3; Scrolling Performance
Date: Sun, 04 Aug 2013 17:32:15 -0400	[thread overview]
Message-ID: <jwvli4h2lx7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20130803140649.GA3348@acm.acm> (Alan Mackenzie's message of "Sat, 3 Aug 2013 14:06:49 +0000")

> I think the best behaviour on auto-repeat scrolling in slow fontifying
> modes would be for the text to scroll by unfontified until the
> <page-down> key is released, the final window contents then being
> fontified.  I've not managed to configure the current jit-lock to
> achieve this behaviour.  Is this possible?

Setting jit-lock-defer-time to (/ 1.0 repeat-rate) should get you
fairly close.

> `jit-lock-function' could then be modified to calculate how many buffer
> positions it is going to be expected to fontify, and whether it can
> achieve this before the putative next auto-repeat scroll command
> arrives.

We could refine jit-lock-defer in such a way, indeed.  I guess we could
do something like set jit-lock-defer-time to a very low value (like 0s)
and then each time we get a request for N bytes of fontification, we
postpone running the timer by some additional increment (until reaching
some maximum).

Of course, this assumes that the time to fontify is proportional to the
text to fontify, which is not necessarily the case (in many case,
a significant part of slowdown is a need to scan a large amount of text
before point to determine the syntax at a particular position in the
buffer, so just fontifying this particular position will require a lot
of time).

Note also that the OP mentioned:

> Once you have scrolled to the bottom of the file Page Down will work
> reasonably, however page up remains slow.

Which seems to indicate that page-up scrolling is too slow even
when font/jit-lock is not called any more.


        Stefan





  parent reply	other threads:[~2013-08-04 21:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 17:33 bug#15011: 24.3; Scrolling Performance Calkins, Chad M
2013-08-02 22:26 ` Barry OReilly
2013-08-02 23:21   ` Drew Adams
2013-08-03  8:09     ` Eli Zaretskii
2013-08-03  1:26   ` Stefan Monnier
     [not found]     ` <20130803140649.GA3348@acm.acm>
2013-08-04 21:32       ` Stefan Monnier [this message]
2013-08-03  8:14   ` 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

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

  git send-email \
    --in-reply-to=jwvli4h2lx7.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=15011@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=gundaetiapo@gmail.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.