all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: mail@daniel-mendler.de
Cc: 46326@debbugs.gnu.org
Subject: bug#46326: 27.1.50; Excessive memory allocations with minibuffer-with-setup-hook
Date: Fri, 05 Feb 2021 17:58:27 +0200	[thread overview]
Message-ID: <83a6sipkv0.fsf@gnu.org> (raw)
In-Reply-To: <4aab2ef892b1df213ca67210021bcd47@mendler.net> (mail@daniel-mendler.de)

> 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	other threads:[~2021-02-05 15:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 12:51 bug#46326: 27.1.50; Excessive memory allocations with minibuffer-with-setup-hook mail
2021-02-05 14:09 ` Eli Zaretskii
2021-02-05 15:20   ` mail
2021-02-05 15:58     ` Eli Zaretskii [this message]
2021-02-05 16:10       ` mail
2021-02-08  9:25 ` jakanakaevangeli
2021-02-09  0:19   ` mail
2021-02-09 22:13     ` jakanakaevangeli
2021-04-23 18:26 ` Stefan Monnier
2021-04-23 19:28   ` Daniel Mendler
2021-04-23 20:34     ` jakanakaevangeli
2021-04-23 20:52       ` Daniel Mendler
2021-04-23 21:27     ` Stefan Monnier
2021-04-24  6:10       ` Eli Zaretskii
2021-04-24 13:06         ` Stefan Monnier
2022-06-16 13:06       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a6sipkv0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=46326@debbugs.gnu.org \
    --cc=mail@daniel-mendler.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.