all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109187: Adjust consing_since_gc when objects are explicitly freed.
Date: Mon, 23 Jul 2012 15:34:30 +0400	[thread overview]
Message-ID: <500D36C6.7000205@yandex.ru> (raw)
In-Reply-To: <jwvfw8ikd4n.fsf-monnier+emacs@gnu.org>

On 07/23/2012 02:06 PM, Stefan Monnier wrote:

>> IMHO, mostly because consing_since_gc means "total size of new objects which
>> are managed by GC". If we manage some of them by hand, we shouldn't allow GC
>> to overestimate an amount of work to be done.
>
> So, it's only for theoretical reasons?
> If so, I'd rather we don't bother.

Hm... not so theoretical. For example, this really helps, especially when editing
huge fontified buffers (not sure that this is 100% correct, BTW):

=== modified file 'src/editfns.c'
--- src/editfns.c	2012-07-17 07:43:01 +0000
+++ src/editfns.c	2012-07-23 11:20:02 +0000
@@ -3379,6 +3379,10 @@

  	  buf->clip_changed = 1; /* Remember that the narrowing changed. */
  	}
+      /* These aren't needed anymore, so don't wait for GC.  */
+      free_marker (XCAR (data));
+      free_marker (XCDR (data));
+      free_cons (XCONS (data));
      }
    else
      /* A buffer, which means that there was no old restriction.  */

Dmitry



  reply	other threads:[~2012-07-23 11:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1SsxuH-00048I-6E@vcs.savannah.gnu.org>
2012-07-23  8:58 ` [Emacs-diffs] /srv/bzr/emacs/trunk r109187: Adjust consing_since_gc when objects are explicitly freed Stefan Monnier
2012-07-23  9:26   ` Dmitry Antipov
2012-07-23 10:06     ` Stefan Monnier
2012-07-23 11:34       ` Dmitry Antipov [this message]
2012-07-23 23:11         ` Stefan Monnier
2012-07-24  4:30           ` Dmitry Antipov
2012-07-24  9:11             ` Stefan Monnier
2012-07-24 11:53               ` Dmitry Antipov
2012-07-24 21:59                 ` Stefan Monnier
2012-07-25  9:55                   ` Dmitry Antipov
2012-07-25 23:47                     ` Stefan Monnier
2012-07-23 11:10     ` Stephen J. Turnbull

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=500D36C6.7000205@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.