[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46326: 27.1.50; Excessive memory allocations with minibuffer-with-se
From: |
jakanakaevangeli |
Subject: |
bug#46326: 27.1.50; Excessive memory allocations with minibuffer-with-setup-hook |
Date: |
Mon, 08 Feb 2021 10:25:33 +0100 |
I seem to have solved the problem by doing the following simple
substitutions in add-hook and remove-hook:
(alist-get ... #'equal) -> (alist-get ...)
equal -> eq
member -> memq
delete -> delq
This changes the behaviour of add/remove-hook a little, for example
(add-hook (lambda () (test)))
(remove-hook (lambda () (test)))
will not be reverse operations anymore, since the two lambdas are not eq
as they are created separately. But the performance gain for big
non-compiled closures might be worth considering.