[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode.
From: |
Alan Mackenzie |
Subject: |
Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode. |
Date: |
Sat, 18 Oct 2014 20:28:39 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Oct 18, 2014 at 06:19:38PM +0000, Alan Mackenzie wrote:
> Hi, Emacs.
> I've measured the time Emacs takes to scroll a large C file, and how much
> of this is due to the inefficiency in backwards `scan-lists's when
> comments contain unbalanced string characters (with
> open-paren-in-column-0-is-defun-start nil).
[ ... ]
> On my set up, a Linux virtual terminal with a window 65 lines high, I get
> the following results:
> no-odd-xdisp.c: 492 scrolls, total time = 42.2749125957489s
> xdisp.c: 492 scrolls, total time = 69.40998315811157s.
> 69.4100 / 42.2749 = 1.642. The original thus takes 64% longer (on
> average) for a backward scroll operation.
I forgot to mention that this was on Emacs 24.3, with full .emacs loaded,
and with an up-to-date stand-alone CC Mode.
> It would seem worthwhile to consider optimising the code to eliminate
> this 64%. Two possibilities suggest themselves: (i) in syntax.c, by
> making use of the syntax-ppss cache (or similar); (ii) In CC Mode, by
> setting syntax-table text properties on unbalanced string quotes.
I've just repeated the measurement on the Emacs trunk, with emacs -Q. I
now get these results:
no-odd-xdisp.c: 500 scrolls, total time = 104.21487808227539s.
xdisp.c: 500 scrolls, total time = 167.73530864715576s.
I don't know why there are more scroll operations needed. But the fact
that scrolling is taking two and a half times longer in the trunk than in
24..3 is noteworthy, and possibly disturbing. I'm think I compiled both
version with the same optimisation level, etc.
> --
> Alan Mackenzie (Nuremberg, Germany).
- Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode., Alan Mackenzie, 2014/10/18
- Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode.,
Alan Mackenzie <=
- Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode., Ulrich Mueller, 2014/10/19
- Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode., Stefan Monnier, 2014/10/19
- Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode., Ulrich Mueller, 2014/10/20
- Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode., Stefan Monnier, 2014/10/20
- Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode., Ulrich Mueller, 2014/10/20
Re: Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode., martin rudalics, 2014/10/20