[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25706: 26.0.50; Slow C file fontification
From: |
Mattias Engdegård |
Subject: |
bug#25706: 26.0.50; Slow C file fontification |
Date: |
Tue, 1 Dec 2020 13:03:21 +0100 |
1 dec. 2020 kl. 10.21 skrev Alan Mackenzie <acm@muc.de>:
> (i) Take the first 10% of the original 4MB file, and save it in a
> different file.
> (ii) Fontify that file from top to bottom: according to EPL, 292s
> (iii) Insert 9 new lines "{}" every 10% of that new file.
> (iv) Fontify the amended file top to bottom: new time 98s.
>
> That's a factor of 3 different.
Thank you, quite remarkable and a very useful piece of information!
Please let me curb some unwarranted optimism that I'm guilty of engendering:
We have been measuring slightly different things. Being lazy, I timed the
fontification in one go:
(font-lock-ensure (point-min) (point-max))
which took about 65 s originally and went down to about 24 s by fixing the
regexps as previously mentioned. Much better but still not wonderful.
You have measured interactive scrolling which is more realistic, but fontifying
the buffer piecemeal it exercises slightly different code paths. Fixing those
regexps helps but not as much, and clearly more work is needed.
(By the way, could you direct me to your benchmark code? I don't think I have
it.)
Still, improving regexps is clearly beneficial. Reducing allocation can be
effective as well; a fair bit of the profile is in the GC.
- bug#25706: 26.0.50; Slow C file fontification, Ravine Var, 2020/12/01
- bug#25706: 26.0.50; Slow C file fontification, Alan Mackenzie, 2020/12/01
- bug#25706: 26.0.50; Slow C file fontification,
Mattias Engdegård <=
- bug#25706: 26.0.50; Slow C file fontification, Alan Mackenzie, 2020/12/01
- bug#25706: 26.0.50; Slow C file fontification, Mattias Engdegård, 2020/12/01
- bug#25706: 26.0.50; Slow C file fontification, Alan Mackenzie, 2020/12/01
- bug#25706: 26.0.50; Slow C file fontification, Mattias Engdegård, 2020/12/01
- bug#25706: 26.0.50; Slow C file fontification, Alan Mackenzie, 2020/12/02
- bug#25706: 26.0.50; Slow C file fontification, Mattias Engdegård, 2020/12/02
- bug#25706: 26.0.50; Slow C file fontification, Alan Mackenzie, 2020/12/03
- bug#25706: 26.0.50; Slow C file fontification, Mattias Engdegård, 2020/12/03
- bug#25706: 26.0.50; Slow C file fontification, Alan Mackenzie, 2020/12/04
- bug#25706: 26.0.50; Slow C file fontification, Mattias Engdegård, 2020/12/05