bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Eli Zaretskii
Subject: bug#46326: 27.1.50; Excessive memory allocations with minibuffer-with-setup-hook
Date: Fri, 05 Feb 2021 17:58:27 +0200

> Date: Fri, 05 Feb 2021 16:20:13 +0100
> From: mail@daniel-mendler.de
> Cc: 46326@debbugs.gnu.org
> 
> > Please show information about the memory consumption.  (The so-called
> > "memory profile" doesn't actually measure memory consumption at all,
> > it just uses memory allocation calls as a poor-man's profiling
> > signal.)
> 
> Yes, I am aware. I am not saying that live memory is the problem,
> but the excessive amount of allocations is a problem, which creates
> unnecessary garbage collector pauses. Therefore I can also not show
> you a profile of the memory consumption, since it is not relevant.

If you are saying that the Lisp code in question conses too many
objects unnecessarily, then the solution is to modify the code to cons
less objects.  That doesn't necessarily indicates the existence of a
bug in Emacs, certainly not with its memory management.

> > What exactly caused you to run the profiler? is the code slow or
> > something?  If so, the problem may be something other than memory
> > consumption.
> 
> Yes, it is slow. Add-hook performs unnecessary allocations causing
> pauses. After replacing the minibuffer-with-setup-hook default
> implementation with my workaround the memory allocations went away
> and the command is much faster. The add-hook calls do not appear in
> the memory profile anymore. See the comment
> https://github.com/minad/consult/issues/193#issuecomment-770650405.

So if you already have a solution for the problem, what is it that you
want us as Emacs maintainers to investigate and fix here?





reply via email to

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