From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel 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 Message-ID: <500D36C6.7000205@yandex.ru> References: <500D18D4.7010506@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1343043139 23471 80.91.229.3 (23 Jul 2012 11:32:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2012 11:32:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 23 13:32:18 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1StGs4-0003SS-Qz for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2012 13:32:16 +0200 Original-Received: from localhost ([::1]:44656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StGs3-00085d-T0 for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2012 07:32:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StGry-00084u-5u for emacs-devel@gnu.org; Mon, 23 Jul 2012 07:32:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StGrx-0003c6-B1 for emacs-devel@gnu.org; Mon, 23 Jul 2012 07:32:10 -0400 Original-Received: from forward13.mail.yandex.net ([95.108.130.120]:47001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StGrw-0003bw-VI for emacs-devel@gnu.org; Mon, 23 Jul 2012 07:32:09 -0400 Original-Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward13.mail.yandex.net (Yandex) with ESMTP id 55B53141FE4; Mon, 23 Jul 2012 15:32:07 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1343043127; bh=wNkJtJPj3PrDBsGqX0hOpnK1DmEXdlzOqogYwYMp0Mk=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=pVZKgDbp/dWDPSiwVLidUoiv+Kb8a8Va7W0LZnZO33FMFmDhTXwFV55fB2hn645wp sA/TA7w/+sdggtjqhJwB7bjyRAPsImOkWuIMe+7b1qVd9r/MzoR5Si/vDxMYr3A01p D/apZwWPnEWNvrr76pYADqLT0Z2tzfNKQOWPAqQk= Original-Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id 3356CE4057D; Mon, 23 Jul 2012 15:32:07 +0400 (MSK) Original-Received: from 172.gprs.mts.ru (172.gprs.mts.ru [213.87.132.172]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id W5GCHnPY-W6GmZdlV; Mon, 23 Jul 2012 15:32:06 +0400 X-Yandex-Rcpt-Suid: monnier@IRO.UMontreal.CA X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1343043127; bh=wNkJtJPj3PrDBsGqX0hOpnK1DmEXdlzOqogYwYMp0Mk=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Vg2yPETwBhRaM5v86mL7gd13bxCQBxjFoEefPpHV86lSX/Rc4ETVOfXDtXBEpcOxn ANn0oKx/EQx5VpFWOKPW6CouJVu1mc4ozuow3yOV4YPzyAxiO4fcpJMg3xWvqXHya3 XpGq97jUk58qOWkM3jBlixgV7mOka0MEoP0d8E9A= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 95.108.130.120 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151815 Archived-At: 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