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.