emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious fontification/C++ context issue - Patch for beginning-of-


From: David Kastrup
Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.
Date: Fri, 15 Dec 2006 01:53:40 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

> With the patch I suggested last night, you still find an initial M->
> in xdisp.c too slow (~4 seconds on your 1.7 GHz PC).  That's a
> massively large file.  How fast must this operation be before you'd
> find it acceptable?  In emacs/src, there are files.c of all sizes,
> ranging from pre-crt0.c (484 bytes) to xdisp.c (722032 bytes).  If
> David Kastrup's conjectured "quadratic dependency" were true (I
> don't think it is), then a "typical" sized file.c (say, eval.c at
> just over 100k) would take ~0.1 seconds for this.  If the dependency
> is linear, it would take ~0.5 seconds.
>
> Please satisfy my curiosity, experiment with decreasing file sizes,
> and tell me at what file size the reaction becomes too slow for you.

The problem appears not quadratic on file size to me, but rather
quadratic on function size, or average fontification search size.  So
large automatically generated code passages would be candidates for
performance hits.

The large slowdown most likely would not be necessary if information
was reused intelligently and not scanned repeatedly.  That requires a
good analysis and careful implementation/reimplementation.

And the end of the pretest is the wrong time to start something like
this.  And it is also the wrong time to check in a half-baked solution
that makes for somewhat more pleasing results while causing large
performance hits.

The feature is not ready for Emacs 22.  And there is no useful plan
that would make it become so.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]