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 16:09:09 +0200

> Date: Fri, 05 Feb 2021 13:51:41 +0100
> From: mail@daniel-mendler.de
> 
> I have an issue on 27.1.50 with excessive memory allocations when using
> minibuffer-with-setup-hook with large closures and :append. This issue 
> has been
> observed in my Consult package, which is similar to Counsel and which 
> provides
> commands based on completing-read. Naturally I have to perform some 
> setup in the
> minibuffer-setup-hook. Most of the memory allocations are due to 
> add-hook and in
> particular the sort function. The sort functions is called because of 
> :append
> which sets a hook priority. The reason seems to be that large closures 
> are
> copied, but I didn't fully investigate the reasons for the issue.
> 
> Example profile:
> 
>      140,068,687  92%       - consult-buffer
>      140,068,687  92%        - consult--buffer

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.)

Please show a recipe starting from "emacs -Q" where a lot of memory is
being consumed, and please show how much memory does the recipe
consume.  Also, I presume invoking "M-x garbage-collect RET" doesn't
release that memory?  If so, please show the return value of
garbage-collect.

> See the issue https://github.com/minad/consult/issues/193 for reference.

I don't see any memory information in that discussion.  I guess you
thought the memory profiler somehow shows memory consumption, but it
doesn't.

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.





reply via email to

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