[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37321: 27.0.50; Excessive gc in a use case (el-search)
From: |
Paul Eggert |
Subject: |
bug#37321: 27.0.50; Excessive gc in a use case (el-search) |
Date: |
Sat, 14 Sep 2019 01:04:07 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/8/19 8:25 AM, Michael Heerdegen wrote:
my Emacs seems to have
become slower independently from gc. There is still a slow down of
searching by a factor of at least 3 or so that doesn't seem to be
related to gc.
Have you tried turning on profiling to see what the problem might be?
I looked into it a bit, and I think the problem is related to this line in
el-search--flatten-tree:
(gc-cons-percentage 0.8)) ;Why is binding it here more effective than
binding it more top-level?
That binding is not effective in general, because it causes Emacs to do most of
its computation with gc-cons-percentage equal to 0.8, but a small amount of it
with gc-cons-percentage equal to 0.1 (the default value). This is in an attempt
to disable most GC. However, the attempt fails in master because when
gc-cons-percentage drops to 0.1 Emacs does a garbage collection pretty much
right away. (In Emacs 26, the code lucks out because Emacs happens to not look
at gc-cons-percentage during the brief time that it is 0.1, so it doesn't GC.)
Proposed ELPA fix attached; it should help performance in Emacs master (where I
checked in some changes recently to help master work a bit better on this
example). The abovementioned line shouldn't be needed in Emacs master.
There may be other places in el-search that would benefit from a change similar
to the attached patch, but I didn't investigate this.
0001-Port-GC-tuning-to-Emacs-27-alpha.patch
Description: Text Data
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Michael Heerdegen, 2019/09/06
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Michael Heerdegen, 2019/09/07
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Paul Eggert, 2019/09/07
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Michael Heerdegen, 2019/09/08
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Michael Heerdegen, 2019/09/08
- bug#37321: 27.0.50; Excessive gc in a use case (el-search),
Paul Eggert <=
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Eli Zaretskii, 2019/09/14
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Paul Eggert, 2019/09/14
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Eli Zaretskii, 2019/09/14
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Paul Eggert, 2019/09/14
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Eli Zaretskii, 2019/09/14
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Richard Stallman, 2019/09/15
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Michael Heerdegen, 2019/09/16
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Paul Eggert, 2019/09/16
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Michael Heerdegen, 2019/09/20
- bug#37321: 27.0.50; Excessive gc in a use case (el-search), Michael Heerdegen, 2019/09/20