From: Alan Mackenzie <acm@muc.de>
To: Ravine Var <ravine.var@gmail.com>
Cc: "Mattias Engdegård" <mattiase@acm.org>,
"Lars Ingebrigtsen" <larsi@gnus.org>,
25706@debbugs.gnu.org
Subject: bug#25706: 26.0.50; Slow C file fontification
Date: Mon, 14 Dec 2020 11:44:35 +0000 [thread overview]
Message-ID: <X9dQIw5EykhKDqXh@ACM> (raw)
In-Reply-To: <871rfset9x.fsf@gmail.com>
Hello, Ravine.
On Mon, Dec 14, 2020 at 12:50:36 +0530, Ravine Var wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > Have you got the option fast-but-imprecise-scrolling set (or customized)
> > to non-nil? If not, could I suggest you try it. It's effect is to stop
> > Emacs fontifying every screen it scrolls over, instead only fontifying
> > screens when it's got no more input commands waiting. This speeds
> > things up quite a bit on a slower machine.
> Turning on fast-but-imprecise-scrolling improves things by a lot.
> Viewing and scrolling the osprey file is much faster/smoother and the
> screen doesn't freeze.
:-)
> > Please put the following code into your *scratch* buffer (it's the same
> > code I've posted before) and evaluate it:
> > (defmacro time-it (&rest forms)
> > "Time the running of a sequence of forms using `float-time'.
> > Call like this: \"M-: (time-it (foo ...) (bar ...) ...)\"."
> > `(let ((start (float-time)))
> > ,@forms
> > (- (float-time) start)))
> > Then please load osprey_reg_map_macro.h freshly into a buffer, and type
> > (or cut and paste) the following into M-:
> > (time-it (let ((n 10)) (while (> n 0) (scroll-up) (sit-for 0) (setq n (1- n)))))
> > What is the reported timing for scrolling these ten screens?
> Running emacs -Q (master + 3 patches) :
> With fast-but-imprecise-scrolling: 0.9250097274780273
> Without fast-but-imprecise-scrolling: 0.8903303146362305
Thanks for doing that further testing.
That's 0.09 seconds per scrolling of a screen. That is surely an
acceptably low delay.
> I think using the fast-but-imprecise-scrolling option
> is a workaround that can be used in underpowered machines
> for big header files...
Or even in up to date full powered machines. ;-) I have it enabled all
the time, and my PC is very similar to your faster one.
So, I propose that these two patches (the big one and the smaller one for
all the c-forward-syntactic-ws's) are sufficient to fix the bug, and I
propose closing it now. What do you say to that?
I have looked at the other problem you mention (slow scrolling through
the machine-generated function proto_register_rrc in the wireshark file
packet-rrc.c) and have made significant progress towards implementing a
cache for the CC Mode function c-looking-at-or-maybe-in-bracelist, which
should eliminate the long delays. Have you raised a new bug for this
problem, yet?
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2020-12-14 11:44 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-13 18:20 bug#25706: 26.0.50; Slow C file fontification Sujith
2020-11-30 11:26 ` Lars Ingebrigtsen
2020-11-30 11:37 ` Lars Ingebrigtsen
2020-11-30 12:46 ` Mattias Engdegård
2020-11-30 12:49 ` Lars Ingebrigtsen
2020-11-30 16:27 ` Eli Zaretskii
2020-11-30 16:38 ` Alan Mackenzie
2020-11-30 16:53 ` Mattias Engdegård
2020-11-30 17:04 ` Mattias Engdegård
2020-12-01 5:48 ` Ravine Var
2020-12-01 13:34 ` Mattias Engdegård
2020-12-01 9:29 ` Alan Mackenzie
2020-12-01 9:44 ` martin rudalics
2020-12-01 10:07 ` Alan Mackenzie
2020-12-01 9:21 ` Alan Mackenzie
2020-12-01 12:03 ` Mattias Engdegård
2020-12-01 12:57 ` Alan Mackenzie
2020-12-01 14:07 ` Mattias Engdegård
2020-12-01 15:27 ` Alan Mackenzie
2020-12-01 18:59 ` Mattias Engdegård
2020-12-02 10:15 ` Alan Mackenzie
[not found] ` <X8dpQeGaDD1w3kXX@ACM>
2020-12-02 15:06 ` Mattias Engdegård
2020-12-03 10:48 ` Alan Mackenzie
2020-12-03 14:03 ` Mattias Engdegård
2020-12-04 21:04 ` Alan Mackenzie
[not found] ` <X8qkcokfZGbaK5A2@ACM>
2020-12-05 15:20 ` Mattias Engdegård
2020-12-08 18:42 ` Alan Mackenzie
[not found] ` <X8/JG7eD7SfkEimH@ACM>
2020-12-08 19:32 ` Mattias Engdegård
2020-12-09 7:31 ` Ravine Var
2020-12-09 7:47 ` Ravine Var
2020-12-10 8:08 ` Alan Mackenzie
2020-12-09 18:46 ` Alan Mackenzie
[not found] ` <X9Ebn7hKnG/vpDcZ@ACM>
2020-12-09 20:04 ` Eli Zaretskii
2020-12-09 20:32 ` Alan Mackenzie
2020-12-10 17:02 ` Ravine Var
2020-12-10 20:02 ` Alan Mackenzie
2020-12-11 10:55 ` Ravine Var
2020-12-12 15:34 ` Alan Mackenzie
[not found] ` <X9TjCeydJaE2mpK8@ACM>
2020-12-14 7:20 ` Ravine Var
2020-12-14 11:44 ` Alan Mackenzie [this message]
2020-12-15 4:01 ` Ravine Var
2020-12-15 12:27 ` Alan Mackenzie
2020-12-09 17:00 ` Mattias Engdegård
2020-12-10 12:26 ` Alan Mackenzie
2020-11-30 18:30 ` Alan Mackenzie
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=X9dQIw5EykhKDqXh@ACM \
--to=acm@muc.de \
--cc=25706@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=mattiase@acm.org \
--cc=ravine.var@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.